! **  WELCOME TO THE ENVIRONMENTAL FLUID DYNAMICS COMPUTER CODE ORIGINALLY
! **  DEVELOPED BY JOHN M. HAMRICK.  THE EFDC CODE WAS INITIALLY
! **  DEVELOPED AT VIRGINIA INSTITUTE OF MARINE SCIENCE,
! **  SCHOOL OF MARINE SCIENCE, THE COLLEGE OF
! **  WILLIAM AND MARY, GLOUCESTER POINT, VA 23062.
! **
! **  THIS VERSION OF THE CODE IS THE RESULT OF UPGRADES AND STREAMLINING
! **  BY DYNAMIC SOLUTIONS, LLC.
! **
! **  COMPATIBIITY WITH TETRA TECH CODE:
! **    THIS CODE WAS ORIGINALLY BASED ON TT VERSION OF JAN 8, 2004
! **    THE FOLLOWING TT RELEASES OF EFDC HAVE BEEN INCORPORATED INTO THIS
! **    VERSION:
! **      2004_03_10
! **      2004_04_09
! **      2004_06_04
! **
! **  THIS CODE HAS BEEN COMPLIED ON A WINDOWS XP SYSTEM USING
! **  THE COMPAQ FORTRAN 6.5 AND INTEL'S FORTRAN COMPILER
! **  THIS VERSION PROVIDES AUTOMATIC MEMORY ALLOCATION USING F90'S
! **  DYNAMIC MEMORY ALLOCATION FUNCTIONS
! **
MODULE GLOBAL
    !
    INTEGER,PARAMETER::wp=8
    INTEGER,PARAMETER::ip=8
    INTEGER,PARAMETER::dprec=kind(1.d0)
    PARAMETER(NTSWQVM=23)  !VB NTSWQVM CHANGED FROM 22 TO 23 TO ACCOMODATE CO2
    !
    CHARACTER*50 AGRFN
    CHARACTER*50 BENFN
    CHARACTER*12 FNDBDH
    CHARACTER*12 FNDDYE
    CHARACTER*12 FNDSAL
    CHARACTER*12 FNDSDB
    CHARACTER*12 FNDSDW
    CHARACTER*11 FNDSEL
    CHARACTER*12 FNDSNB
    CHARACTER*12 FNDSNW
    CHARACTER*11 FNDTEM
    CHARACTER*12 FNDUUU
    CHARACTER*12 FNDVVV
    CHARACTER*12 FNDWWW
    CHARACTER*12 FNDWQAS      !Greg Rocheleau Feb 2019
    CHARACTER*12 FNDWQAL      !Greg Rocheleau Feb 2019
    CHARACTER*12 FNDWQD       !Greg Rocheleau Feb 2019
    CHARACTER*12 FNDWQN       !Greg Rocheleau Feb 2019
    CHARACTER*12 FNDWQO       !Greg Rocheleau Feb 2019
    CHARACTER*12 FNDWQNH      !Greg Rocheleau Feb 2019
    CHARACTER*12 FNDWQPON     !Greg Rocheleau Feb 2019
    CHARACTER*12 FNDWQDON     !Greg Rocheleau Feb 2019
    CHARACTER*12 FNDWQPO4     !Greg Rocheleau Feb 2019
    CHARACTER*50 ICIFN
    CHARACTER*50 NCOFN
    CHARACTER*50 NPLFN
    CHARACTER*50 PSLFN
    CHARACTER*50 RSTOFN
    CHARACTER*50 STLFN
    CHARACTER*50 SUNFN
    !
    CHARACTER*20 CCTITLE(100)
    CHARACTER*20 CLSL(100)
    CHARACTER*20 CVTITLE(100)
    CHARACTER* 3 WQTSNAME(NTSWQVM)
    !
    CHARACTER*20,ALLOCATABLE,DIMENSION(:)::CLTMSR
    CHARACTER* 2,ALLOCATABLE,DIMENSION(:)::CNTMSR
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNAVB
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNAVV
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNBED
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDOX
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDTBC
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDTBF
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDTBP
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDTBT
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDTWC
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDTWF
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDTWP
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDTWT
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNDYE
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNNHX
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNQ3D
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNQQE
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNSAL
    CHARACTER*14,ALLOCATABLE,DIMENSION(:,:)::FNSBL
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNSED
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNSEL
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNSFL
    CHARACTER*14,ALLOCATABLE,DIMENSION(:,:)::FNSND
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNTEM
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNTOC
    CHARACTER*14,ALLOCATABLE,DIMENSION(:,:)::FNTOX
    CHARACTER*15,ALLOCATABLE,DIMENSION(:,:)::FNTXBC
    CHARACTER*15,ALLOCATABLE,DIMENSION(:,:)::FNTXBF
    CHARACTER*15,ALLOCATABLE,DIMENSION(:,:)::FNTXBP
    CHARACTER*15,ALLOCATABLE,DIMENSION(:,:)::FNTXBT
    CHARACTER*15,ALLOCATABLE,DIMENSION(:,:)::FNTXWC
    CHARACTER*15,ALLOCATABLE,DIMENSION(:,:)::FNTXWF
    CHARACTER*15,ALLOCATABLE,DIMENSION(:,:)::FNTXWP
    CHARACTER*15,ALLOCATABLE,DIMENSION(:,:)::FNTXWT
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNU3D
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNUVE
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNUVT
    CHARACTER*12,ALLOCATABLE,DIMENSION(:)::FNV3D
    CHARACTER* 3,ALLOCATABLE,DIMENSION(:)::SMTSNAME
    CHARACTER* 5,ALLOCATABLE,DIMENSION(:)::SYMBOL
    !
    LOGICAL IS_TIMING
    LOGICAL ISCURVATURE
    LOGICAL DEBUG
    LOGICAL COMPUTESOLRAD
    LOGICAL USESHADE
    !
    LOGICAL,ALLOCATABLE,DIMENSION(:)::LMASKDRY
    LOGICAL,ALLOCATABLE,DIMENSION(:)::SMHYST
    !
    INTEGER I3DMAX
    INTEGER I3DMIN
    INTEGER I3DRW
    INTEGER IADJDMP
    INTEGER IALSTUP
    INTEGER IALTYP
    INTEGER IASWRAD
    INTEGER IAUXICM
    INTEGER IBEDBDNU
    INTEGER IBEDDDNU
    INTEGER IBEDINTP
    INTEGER IBEDLAYU
    INTEGER IBEDMNX
    INTEGER IBEDV
    INTEGER IBMECH
    INTEGER IBMECHD
    INTEGER IBMECHK
    INTEGER IBSC
    INTEGER IC
    INTEGER ICICM1
    INTEGER ICICM2
    INTEGER ICICM3
    INTEGER ICICM4
    INTEGER ICICM5
    INTEGER ICK2COR
    INTEGER ICM
    INTEGER ICRCA1
    INTEGER ICRCA2
    INTEGER ICRCA3
    INTEGER ICRCA4
    INTEGER ICRCA5
    INTEGER ICSHOW
    INTEGER IDNOTRVA
    INTEGER IDRYCK
    INTEGER IDRYTBP
    INTEGER IG
    INTEGER IGM
    INTEGER IHYDOUT
    INTEGER IINTPG
    INTEGER ILRPD1
    INTEGER ILRPD2
    INTEGER IMORPH
    INTEGER INCORE
    INTEGER INITTEMP
    INTEGER INSMICI
    INTEGER INSMRST
    INTEGER INWQAGR
    INTEGER INWQBEN
    INTEGER INWQICI
    INTEGER INWQNPL
    INTEGER INWQPSL
    INTEGER INWQRST
    INTEGER INWQSTL
    INTEGER INWQSUN
    INTEGER IPLRPD
    INTEGER IPPHXY
    INTEGER IQOPT
    INTEGER IRECL
    INTEGER IRVEC
    INTEGER ITRICELL
    INTEGER IS2LMC
    INTEGER IS2TIM
    INTEGER IS2TL
    INTEGER IS3DDYE
    INTEGER IS3DO
    INTEGER IS3DSAL
    INTEGER IS3DSED
    INTEGER IS3DSND
    INTEGER IS3DTEM
    INTEGER IS3DTOX
    INTEGER IS3DUUU
    INTEGER IS3DVVV
    INTEGER IS3DWWW
    INTEGER ISADMP
    INTEGER ISAHMF
    INTEGER ISAVBMX
    INTEGER ISAVEC
    INTEGER ISBAL
    INTEGER ISBARD
    INTEGER ISBBDN
    INTEGER ISBDLDBC
    INTEGER ISBEDSTR
    INTEGER ISBEXP
    INTEGER ISBLAY
    INTEGER ISBLFUC
    INTEGER ISBODYF
    INTEGER ISBPH
    INTEGER ISBPOR
    INTEGER ISBSDFUF
    INTEGER ISBSED
    INTEGER ISBSND
    INTEGER ISBVDR
    INTEGER ISCDMA
    INTEGER ISCFL
    INTEGER ISCFLM
    INTEGER ISCHAN
    INTEGER ISCLO
    INTEGER ISCOMP
    INTEGER ISCORTBC
    INTEGER ISCORTBCD
    INTEGER ISCORV
    INTEGER ISCOSMIC
    INTEGER ISDCCA
    INTEGER ISDHD
    INTEGER ISDIA
    INTEGER ISDICM
    INTEGER ISDIQ
    INTEGER ISDISP
    INTEGER ISDIUDIA
    INTEGER ISDIURDO
    INTEGER ISDIVEX
    INTEGER ISDMPP
    INTEGER ISDMPT
    INTEGER ISDMPU
    INTEGER ISDMPW
    INTEGER ISDRY
    INTEGER ISDRYD
    INTEGER ISDSOLV
    INTEGER ISDTXBUG
    INTEGER ISDUMP
    INTEGER ISDYNSTP
    INTEGER ISDZBR
    INTEGER ISECSPV
    INTEGER ISECVPV
    INTEGER ISEDAL
    INTEGER ISEDBED
    INTEGER ISEDBINT
    INTEGER ISEDDT
    INTEGER ISEDDTC
    INTEGER ISEDEFF
    INTEGER ISEDINT
    INTEGER ISEDVW
    INTEGER ISEDWC
    INTEGER ISEVER
    INTEGER ISFAVB
    INTEGER ISFDCH
    INTEGER ISFIRST
    INTEGER ISGWIE
    INTEGER ISGWIT
    INTEGER ISHDMF
    INTEGER ISHOW
    INTEGER ISHPRT
    INTEGER ISHTA
    INTEGER ISIA
    INTEGER ISICM
    INTEGER ISINWV
    INTEGER ISITB
    INTEGER ISLOG
    INTEGER ISLRPD
    INTEGER ISLSHA
    INTEGER ISLSTR
    INTEGER ISLTMT
    INTEGER ISLTMTS
    INTEGER ISMASK
    INTEGER ISMHYST
    INTEGER ISMICI
    INTEGER ISMMC
    INTEGER ISMORST
    INTEGER ISMOZB
    INTEGER ISMRST
    INTEGER ISMTCMBS
    INTEGER ISMTDMBS
    INTEGER ISMTS
    INTEGER ISMTSB
    INTEGER ISMTSDT
    INTEGER ISMTSE
    INTEGER ISMUD
    INTEGER ISMZ
    INTEGER ISMZB
    INTEGER ISNDAL
    INTEGER ISNDVW
    INTEGER ISNDWC
    INTEGER ISNEGH
    INTEGER ISNKH
    INTEGER ISPAR
    INTEGER ISPCOR
    INTEGER ISPD
    INTEGER ISPERC
    INTEGER ISPGNS
    INTEGER ISPNHYDS
    INTEGER ISPPH
    INTEGER ISQQ
    INTEGER ISR3DO
    INTEGER ISRBPH
    INTEGER ISRCA
    INTEGER ISRESTI
    INTEGER ISRESTO
    INTEGER ISRESTR
    INTEGER ISRLID
    INTEGER ISRPPH
    INTEGER ISRVPH
    INTEGER ISRVPV
    INTEGER ISSBAL
    INTEGER ISSDBIN
    INTEGER ISSED2DT
    INTEGER ISSFLDN
    INTEGER ISSFLFE
    INTEGER ISSSMMT
    INTEGER ISTDOCB
    INTEGER ISTDOCW
    INTEGER ISTICM
    INTEGER ISTL
    INTEGER ISTMSR
    INTEGER ISTPOCB
    INTEGER ISTPOCW
    INTEGER ISUD
    INTEGER ISVEG
    INTEGER ISVEGL
    INTEGER ISVPH
    INTEGER ISVPV
    INTEGER ISVSFP
    INTEGER ISWASP
    INTEGER ISWASP1
    INTEGER ISWASPD
    INTEGER ISWAVE
    INTEGER ISWCBL
    INTEGER ISWQAVG
    INTEGER ISWQCMAP
    INTEGER ISWQLVL
    INTEGER ISWQMAX
    INTEGER ISWQMIN
    INTEGER ISWQSMAP
    INTEGER ISWRSI
    INTEGER ISWRSR
    INTEGER ISWVSD
    INTEGER ITER
    INTEGER ITERHPM
    INTEGER ITERM
    INTEGER ITNWQ
    INTEGER ITRMADJ
    INTEGER ITRMAX
    INTEGER ITRMIA
    INTEGER ITRMIN
    INTEGER ITWCBL1
    INTEGER ITWCBL2
    INTEGER ITWCBL3
    INTEGER ITWCBL4
    INTEGER ITWCBL5
    INTEGER IVOPT
    INTEGER IVPHXY
    INTEGER IWQAGR
    INTEGER IWQBEN
    INTEGER IWQDIUDT
    INTEGER IWQFCB
    INTEGER IWQICI
    INTEGER IWQM
    INTEGER IWQNC
    INTEGER IWQNPL
    INTEGER IWQONC
    INTEGER IWQORST
    INTEGER IWQPS
    INTEGER IWQPS_GL
    INTEGER IWQPSL
    INTEGER IWQRST
    INTEGER IWQSI
    INTEGER IWQSRP
    INTEGER IWQSTL
    INTEGER IWQSTOX
    INTEGER IWQSUN
    INTEGER IWQTS
    INTEGER IWQTSB
    INTEGER IWQTSDT
    INTEGER IWQTSE
    INTEGER IWQVLIM
    INTEGER IWQZ
    INTEGER J3DMAX
    INTEGER J3DMIN
    INTEGER JC
    INTEGER JCM
    INTEGER JCSHOW
    INTEGER JG
    INTEGER JGM
    INTEGER JLRPD1
    INTEGER JLRPD2
    INTEGER JS3DDYE
    INTEGER JS3DSAL
    INTEGER JS3DSED
    INTEGER JS3DSND
    INTEGER JS3DTEM
    INTEGER JS3DTOX
    INTEGER JS3DUUU
    INTEGER JS3DVVV
    INTEGER JS3DWWW
    INTEGER JSBAL
    INTEGER JSBALE
    INTEGER JSBALO
    INTEGER JSBPH
    INTEGER JSBPHA
    INTEGER JSDUMP
    INTEGER JSHYDOUT
    INTEGER JSICM
    INTEGER JSLRPD
    INTEGER JSLSHA
    INTEGER JSPD
    INTEGER JSPPH
    INTEGER JSRCA
    INTEGER JSRESTR
    INTEGER JSRPPH
    INTEGER JSRVPH
    INTEGER JSRVPV
    INTEGER JSSBAL
    INTEGER JSTBXY
    INTEGER JSTMSR
    INTEGER JSVPH
    INTEGER JSVPV
    INTEGER JSVSFP
    INTEGER JSWASP
    INTEGER JSWAVE
    INTEGER JSWRPH
    INTEGER KB
    INTEGER KBM
    INTEGER KC
    INTEGER KCM
    INTEGER KGM
    INTEGER KPC
    INTEGER KPCM
    INTEGER KS
    INTEGER KSM
    INTEGER L1LOC
    INTEGER L2LOC
    INTEGER L3LOC
    INTEGER LA
    INTEGER LALT
    INTEGER LB
    INTEGER LC
    INTEGER LCGLM
    INTEGER LCLT
    INTEGER LCM
    INTEGER LCMWQ
    INTEGER LDM
    INTEGER LDMWQ
    INTEGER LMINSTEP
    INTEGER LORMAX
    INTEGER LR
    INTEGER LSLSHA
    INTEGER LVC
    INTEGER LWASP
    INTEGER MAXRECL
    INTEGER MAXRECL0
    INTEGER MAXRECL2
    INTEGER MAXRECL3
    INTEGER MAXRECL4
    INTEGER MDCHCK
    INTEGER MDCHH
    INTEGER MDCHHD
    INTEGER MDCHHD2
    INTEGER MDCHHQ
    INTEGER MDCHIL
    INTEGER MDCHITM
    INTEGER MDVSFP
    INTEGER MDVSM
    INTEGER MGM
    INTEGER MLLSHA
    INTEGER MLM
    INTEGER MLRAVG
    INTEGER MLRPDRT
    INTEGER MLTMSR
    INTEGER MLTMSRM
    INTEGER MLVSFP
    INTEGER MSFSER
    INTEGER MSFTLST
    INTEGER MTIDE
    INTEGER MTM
    INTEGER MTSSTSPM
    INTEGER MTVSM
    INTEGER MVEGOW
    INTEGER MVEGTYP
    INTEGER N
    INTEGER NASER
    INTEGER NASERM
    INTEGER NATD
    INTEGER NAZD
    INTEGER NBAL
    INTEGER NBALE
    INTEGER NBALO
    INTEGER NBAN
    INTEGER NBBEM
    INTEGER NBBNM
    INTEGER NBBSM
    INTEGER NBBWM
    INTEGER NBC
    INTEGER NBDYNSTP
    INTEGER NBFCNT
    INTEGER NBTMSR
    INTEGER NBUD
    INTEGER NBVSFP
    INTEGER NC
    INTEGER NC3DO
    INTEGER NCALL3D
    INTEGER NCBE
    INTEGER NCBN
    INTEGER NCBPH
    INTEGER NCBS
    INTEGER NCBW
    INTEGER NCDUMP
    INTEGER NCHANM
    INTEGER NCHYDOUT
    INTEGER NCICM
    INTEGER NCICM1
    INTEGER NCICM2
    INTEGER NCICM3
    INTEGER NCICM4
    INTEGER NCICM5
    INTEGER NCLSHA
    INTEGER NCPD
    INTEGER NCPPH
    INTEGER NCRCA1
    INTEGER NCRCA2
    INTEGER NCRCA3
    INTEGER NCRCA4
    INTEGER NCRCA5
    INTEGER NCSERM
    INTEGER NCTBC
    INTEGER NCTMSR
    INTEGER NCVPH
    INTEGER NCVPV
    INTEGER NDASER
    INTEGER NDCSER
    INTEGER NDDAM
    INTEGER NDDOAVG
    INTEGER NDDOCNT
    INTEGER NDGWSER
    INTEGER NDISP
    INTEGER NDLTAVG
    INTEGER NDLTCNT
    INTEGER NDM
    INTEGER NDMWQ
    INTEGER NDOCNT
    INTEGER NDPSER
    INTEGER NDQCLT
    INTEGER NDQCLT2
    INTEGER NDQSER
    INTEGER NDQWRSR
    INTEGER NDRYSTP
    INTEGER NDVEGSER
    INTEGER NDWQCSR
    INTEGER NDWQPSR
    INTEGER NDWSER
    INTEGER NFDCHZ
    INTEGER NFICM
    INTEGER NFIELD
    INTEGER NFLTMT
    INTEGER NGLM
    INTEGER NGWSER
    INTEGER NGWSERM
    INTEGER NHAR
    INTEGER NHYCNT
    INTEGER NINCRMT
    INTEGER NINTFL
    INTEGER NITERAT
    INTEGER NJPSM
    INTEGER NJUNX
    INTEGER NJUNXM
    INTEGER NJUNY
    INTEGER NJUNYM
    INTEGER NLCDA
    INTEGER NLDAM
    INTEGER NLIM
    INTEGER NLRPD
    INTEGER NLTC
    INTEGER NLTS
    INTEGER NMMT
    INTEGER NMNLO
    INTEGER NN
    INTEGER NBCSOP
    INTEGER NBCS
    INTEGER NP
    INTEGER NP3DO
    INTEGER NPBE
    INTEGER NPBEM
    INTEGER NPBN
    INTEGER NPBNM
    INTEGER NPBPH
    INTEGER NPBS
    INTEGER NPBSM
    INTEGER NPBW
    INTEGER NPBWM
    INTEGER NPD
    INTEGER NPD_TOT
    INTEGER NPDM
    INTEGER NPDRT
    INTEGER NPFORM
    INTEGER NPFORT
    INTEGER NPNSBP
    INTEGER NPPPH
    INTEGER NPRINT
    INTEGER NPSER
    INTEGER NPSERM
    INTEGER NPSTMSR
    INTEGER NPVPH
    INTEGER NPVPV
    INTEGER NQCTL
    INTEGER NQCTLM
    INTEGER NQCTLT
    INTEGER NQCTTM
    INTEGER NQIJ
    INTEGER NQINFLM
    INTEGER NQJPIJ
    INTEGER NQJPM
    INTEGER NQSER
    INTEGER NQSERM
    INTEGER NQSIJ
    INTEGER NQSIJ_GL
    INTEGER NQSIJM
    INTEGER NQWR
    INTEGER NQWRM
    INTEGER NQWRSR
    INTEGER NQWRSRM
    INTEGER NR0
    INTEGER NR1
    INTEGER NR2
    INTEGER NR3
    INTEGER NR4
    INTEGER NR5
    INTEGER NR6
    INTEGER NRC
    INTEGER NRCAL3D
    INTEGER NREC
    INTEGER NREC0
    INTEGER NREC2
    INTEGER NREC3
    INTEGER NREC4
    INTEGER NRFLD
    INTEGER NSBDLDBC
    INTEGER NSBMAX
    INTEGER NSCM
    INTEGER NSDUMP
    INTEGER NSED
    INTEGER NSEDSER
    INTEGER NSEDSRF
    INTEGER NSEDSRL
    INTEGER NSHMAX
    INTEGER NSHOWC
    INTEGER NSHOWR
    INTEGER NSHTYPE
    INTEGER NSM
    INTEGER NSMG
    INTEGER NSMGM
    INTEGER NSMTS
    INTEGER NSMTSM
    INTEGER NSMZ
    INTEGER NSMZM
    INTEGER NSNAPSHOTS
    INTEGER NSND
    INTEGER NSNDSER
    INTEGER NSNDSRF
    INTEGER NSNDSRL
    INTEGER NSNM
    INTEGER NSTM
    INTEGER NSTMSR
    INTEGER NSTVM
    INTEGER NSVSFP
    INTEGER NTC
    INTEGER NTCLSHA
    INTEGER NTCMMT
    INTEGER NTCNB
    INTEGER NTCPP
    INTEGER NTCVB
    INTEGER NTIMER
    INTEGER NTOX
    INTEGER NTOXSER
    INTEGER NTOXSRF
    INTEGER NTOXSRL
    INTEGER NTS
    INTEGER NTSBR
    INTEGER NTSM
    INTEGER NTSMMT
    INTEGER NTSNB
    INTEGER NTSPP
    INTEGER NTSPTC
    INTEGER NTSPTC2
    INTEGER NTSSMV
    INTEGER NTSSMVM
    INTEGER NTSSTSP
    INTEGER NTSSTSPM
    INTEGER NTSTBC
    INTEGER NTSVB
    INTEGER NTSWQV
    !INTEGER NTSWQVM   PARAMETER VALUE
    INTEGER NTSWV
    INTEGER NTTC
    INTEGER NTTS
    INTEGER NTXM
    INTEGER NUBE
    INTEGER NUBEM
    INTEGER NUBW
    INTEGER NUBWM
    INTEGER NVBN
    INTEGER NVBNM
    INTEGER NVBS
    INTEGER NVBSM
    INTEGER NVEGSER
    INTEGER NVEGSERM
    INTEGER NVEGTPM
    INTEGER NWCUNT
    INTEGER WREADCNT
    INTEGER JSSWAVE
    INTEGER NWGG
    INTEGER NWGGM
    INTEGER NWHYDOUT
    INTEGER NWPD
    INTEGER NWQCNT
    INTEGER NWQCSRM
    INTEGER NWQKCNT
    INTEGER NWQKDPT
    INTEGER NWQOBE
    INTEGER NWQOBN
    INTEGER NWQOBS
    INTEGER NWQOBW
    INTEGER NWQOBE_GL
    INTEGER NWQOBN_GL
    INTEGER NWQOBS_GL
    INTEGER NWQOBW_GL
    INTEGER NWQPS_GL
    INTEGER NWQPSM
    INTEGER NWQPSRM
    INTEGER NWQTD
    INTEGER NWQTDM
    INTEGER NWQTS
    INTEGER NWQTSM
    INTEGER NWQV
    INTEGER NWQVM
    INTEGER NWQZ
    INTEGER NWQZM
    INTEGER NWSER
    INTEGER NWSERM
    INTEGER NWTMSR
    INTEGER NWUPDT
    INTEGER NWVDAT
    INTEGER NXYSDATM
    !
    INTEGER ISADAC(0:8)
    INTEGER ISADAH(0:8)
    INTEGER ISADAV(0:8)
    INTEGER ISCDA(0:8)
    INTEGER ISCDCA(0:8)
    INTEGER ISCI(0:8)
    INTEGER ISCO(0:8)
    INTEGER ISFCT(0:8)
    INTEGER ISHPLTV(8)
    INTEGER ISPHXY(8)
    INTEGER ISPLIT(0:8)
    INTEGER ISRSPH(8)
    INTEGER ISRSPV(8)
    INTEGER ISSPH(8)
    INTEGER ISSPV(8)
    INTEGER ISTOPT(0:8)
    INTEGER ISTRAN(0:8)
    INTEGER ISTRWQ(NTSWQVM)
    INTEGER IWRSP(20)  ! *** SEDZLJ
    INTEGER JSRSPH(8)
    INTEGER JSRSPV(8)
    INTEGER JSSPH(8)
    INTEGER JSSPV(8)
    INTEGER,ALLOCATABLE,DIMENSION(:)::LWQTS
    INTEGER NCSPH(8)
    INTEGER NCSPV(8)
    INTEGER NIJSPV(10)
    INTEGER NIJVPV(10)
    INTEGER NPSPH(8)
    INTEGER NPSPV(8)
    INTEGER NWQCSR(NTSWQVM)
    INTEGER VARUNCOUNT !counter for ensight file VB
    !
    INTEGER,ALLOCATABLE,DIMENSION(:)::IACTLR
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IAIJ
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IAKL
    INTEGER,ALLOCATABLE,DIMENSION(:)::IAP
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IBENMAP
    INTEGER,ALLOCATABLE,DIMENSION(:)::IBLTAUC
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICALJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICCDA
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICDA
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICFLMP
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICORDXV
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICORDYU
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICPSL
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::ICSMTS
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::ICWQTS
    INTEGER,ALLOCATABLE,DIMENSION(:)::IDRICM
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IJCT
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IJCTLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::IL
    INTEGER,ALLOCATABLE,DIMENSION(:)::ILLSHA
    INTEGER,ALLOCATABLE,DIMENSION(:)::ILLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::ILRPD
    INTEGER,ALLOCATABLE,DIMENSION(:)::ILTMSR
    INTEGER,ALLOCATABLE,DIMENSION(:)::IMASKDRY
    INTEGER,ALLOCATABLE,DIMENSION(:)::IMDCHH
    INTEGER,ALLOCATABLE,DIMENSION(:)::IMDCHU
    INTEGER,ALLOCATABLE,DIMENSION(:)::IMDCHV
    INTEGER,ALLOCATABLE,DIMENSION(:)::IMWQZT
    INTEGER,ALLOCATABLE,DIMENSION(:)::IMWQZT1
    INTEGER,ALLOCATABLE,DIMENSION(:)::IMWQZT2
    INTEGER,ALLOCATABLE,DIMENSION(:)::INPNS
    INTEGER,ALLOCATABLE,DIMENSION(:)::IOUTJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::IPBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::IPBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::IPBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::IPBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::IQCAX
    INTEGER,ALLOCATABLE,DIMENSION(:)::IQCTLD
    INTEGER,ALLOCATABLE,DIMENSION(:)::IQCTLU
    INTEGER,ALLOCATABLE,DIMENSION(:)::IQJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::IQS
    INTEGER,ALLOCATABLE,DIMENSION(:)::IQWRD
    INTEGER,ALLOCATABLE,DIMENSION(:)::IQWRU
    INTEGER,ALLOCATABLE,DIMENSION(:)::IRELH
    INTEGER,ALLOCATABLE,DIMENSION(:)::IROUSE
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISBDLD
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISCDRY
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISDBLDIR
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISDIFBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISDJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISEDBU
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISEDSCOR
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISEDWU
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISENT
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISLTAUC
    !      INTEGER,ALLOCATABLE,DIMENSION(:)::ISLUSED  ! NOT USED
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISMHYPD
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISMT
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISMZMAP
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISNDBU
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISNDEQ
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISNDM1
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISNDM2
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISNDWU
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISPBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISPBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISPBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISPBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISPNS
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::ISPV
    !INTEGER,ALLOCATABLE,DIMENSION(:)::ISRED     ! PMC - NOT USED
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISS3DSED
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISS3DSND
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISS3DTOX
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISTJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISTOC
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISTOXR
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISUDPC
    INTEGER,ALLOCATABLE,DIMENSION(:)::ISWDINT
    INTEGER,ALLOCATABLE,DIMENSION(:)::ITOXBU
    INTEGER,ALLOCATABLE,DIMENSION(:)::ITOXWU
    INTEGER,ALLOCATABLE,DIMENSION(:)::ITPCDA
    INTEGER,ALLOCATABLE,DIMENSION(:)::ITXBDUT
    INTEGER,ALLOCATABLE,DIMENSION(:)::ITXINT
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::ITXPARB
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::ITXPARBC
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::ITXPARW
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::ITXPARWC
    INTEGER,ALLOCATABLE,DIMENSION(:)::IUBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::IUBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::IUPCJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::IVBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::IVBS
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IVPV
    INTEGER,ALLOCATABLE,DIMENSION(:)::IVSFP
    INTEGER,ALLOCATABLE,DIMENSION(:)::IWGG
    INTEGER,ALLOCATABLE,DIMENSION(:)::IWQCBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::IWQCBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::IWQCBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::IWQCBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::IWQKA
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQOBE
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQOBN
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQOBS
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQOBW
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQOBE_GL
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQOBN_GL
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQOBS_GL
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQOBW_GL
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQPSC
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQPSV
    INTEGER,ALLOCATABLE,DIMENSION(:)::IWQT
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IWQZMAP
    INTEGER,ALLOCATABLE,DIMENSION(:)::IWRSPB
    INTEGER,ALLOCATABLE,DIMENSION(:)::JCBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::JCBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::JCBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::JCBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::JCCDA
    INTEGER,ALLOCATABLE,DIMENSION(:)::JCDA
    INTEGER,ALLOCATABLE,DIMENSION(:)::JCPSL
    INTEGER,ALLOCATABLE,DIMENSION(:)::JL
    INTEGER,ALLOCATABLE,DIMENSION(:)::JLLSHA
    INTEGER,ALLOCATABLE,DIMENSION(:)::JLLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::JLRPD
    INTEGER,ALLOCATABLE,DIMENSION(:)::JLTMSR
    INTEGER,ALLOCATABLE,DIMENSION(:)::JMDCHH
    INTEGER,ALLOCATABLE,DIMENSION(:)::JMDCHU
    INTEGER,ALLOCATABLE,DIMENSION(:)::JMDCHV
    INTEGER,ALLOCATABLE,DIMENSION(:)::JNPNS
    INTEGER,ALLOCATABLE,DIMENSION(:)::JPBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::JPBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::JPBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::JPBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::JQCAX
    INTEGER,ALLOCATABLE,DIMENSION(:)::JQCTLD
    INTEGER,ALLOCATABLE,DIMENSION(:)::JQCTLU
    INTEGER,ALLOCATABLE,DIMENSION(:)::JQJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::JQS
    INTEGER,ALLOCATABLE,DIMENSION(:)::JQWRD
    INTEGER,ALLOCATABLE,DIMENSION(:)::JQWRU
    INTEGER,ALLOCATABLE,DIMENSION(:)::JSPNS
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::JSPV
    INTEGER,ALLOCATABLE,DIMENSION(:)::JSS3DSED
    INTEGER,ALLOCATABLE,DIMENSION(:)::JSS3DSND
    INTEGER,ALLOCATABLE,DIMENSION(:)::JSS3DTOX
    INTEGER,ALLOCATABLE,DIMENSION(:)::JUBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::JUBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::JUNTPX
    INTEGER,ALLOCATABLE,DIMENSION(:)::JUNTPY
    INTEGER,ALLOCATABLE,DIMENSION(:)::JUPCJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::JVBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::JVBS
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::JVPV
    INTEGER,ALLOCATABLE,DIMENSION(:)::JVSFP
    INTEGER,ALLOCATABLE,DIMENSION(:)::JWGG
    INTEGER,ALLOCATABLE,DIMENSION(:)::JWQCBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::JWQCBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::JWQCBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::JWQCBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::KBT
    INTEGER,ALLOCATABLE,DIMENSION(:)::KCEFDC
    INTEGER,ALLOCATABLE,DIMENSION(:)::KCPSL
    INTEGER,ALLOCATABLE,DIMENSION(:)::KEFFJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::KFEFDC
    INTEGER,ALLOCATABLE,DIMENSION(:)::KPB
    INTEGER,ALLOCATABLE,DIMENSION(:)::KPS
    INTEGER,ALLOCATABLE,DIMENSION(:)::KQJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::KQWRD
    INTEGER,ALLOCATABLE,DIMENSION(:)::KQWRU
    INTEGER,ALLOCATABLE,DIMENSION(:)::KUPCJP
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::KUPW
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::KWBU
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::KWBV
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::KWU
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::KWV
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::KWW
    !INTEGER,ALLOCATABLE,DIMENSION(:)::LBC    ! PMC - NOT USED
    INTEGER,ALLOCATABLE,DIMENSION(:)::LBERC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LBNRC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LBSRC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LBWRC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCDA
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCEFDC
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LCHNC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCONSOL
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCT
    INTEGER,ALLOCATABLE,DIMENSION(:)::LCTLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::LFEFDC
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LIJ
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LIJLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::LJUNX
    INTEGER,ALLOCATABLE,DIMENSION(:)::LJUNY
    INTEGER,ALLOCATABLE,DIMENSION(:)::LLBC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LLRC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LLSHA
    INTEGER,ALLOCATABLE,DIMENSION(:)::LMDCHH
    INTEGER,ALLOCATABLE,DIMENSION(:)::LMDCHU
    INTEGER,ALLOCATABLE,DIMENSION(:)::LMDCHV
    INTEGER,ALLOCATABLE,DIMENSION(:)::LNC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LNCLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::LNEC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LNWC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LOBCS
    INTEGER,ALLOCATABLE,DIMENSION(:)::LBCS
    INTEGER,ALLOCATABLE,DIMENSION(:)::LORDER
    INTEGER,ALLOCATABLE,DIMENSION(:)::LPBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::LPBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::LPBS
    INTEGER,ALLOCATABLE,DIMENSION(:)::LPBW
    INTEGER,ALLOCATABLE,DIMENSION(:)::LQCTLD
    INTEGER,ALLOCATABLE,DIMENSION(:)::LQCTLU
    INTEGER,ALLOCATABLE,DIMENSION(:)::LQS
    INTEGER,ALLOCATABLE,DIMENSION(:)::LQWRD
    INTEGER,ALLOCATABLE,DIMENSION(:)::LQWRU
    !INTEGER,ALLOCATABLE,DIMENSION(:)::LRC    ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:)::LREBC  ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:)::LRNBC  ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:)::LRSBC  ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:)::LRWBC  ! PMC - NOT USED
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSBLBCD
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSBLBCU
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSCLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSEC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSHAB
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSHAP
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSHAU
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSHAUE
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSMTS
    INTEGER,ALLOCATABLE,DIMENSION(:)::LSWC
    INTEGER,ALLOCATABLE,DIMENSION(:)::LUBE
    INTEGER,ALLOCATABLE,DIMENSION(:)::LUBW
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LUPU
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LUPV
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LUU
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LUV
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LUW
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LUWV
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LUWW
    INTEGER,ALLOCATABLE,DIMENSION(:)::LVBN
    INTEGER,ALLOCATABLE,DIMENSION(:)::LVBS
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LVSU
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LVSW
    !INTEGER,ALLOCATABLE,DIMENSION(:,:)::LVU   ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:,:)::LVV   ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:,:)::LVW   ! PMC - NOT USED
    INTEGER,ALLOCATABLE,DIMENSION(:)::LWGG
    INTEGER,ALLOCATABLE,DIMENSION(:)::MASER
    INTEGER,ALLOCATABLE,DIMENSION(:)::MATLAST
    INTEGER,ALLOCATABLE,DIMENSION(:)::MCNTLR
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::MCSER
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::MCTLAST
    INTEGER,ALLOCATABLE,DIMENSION(:)::MDCHTYP
    INTEGER,ALLOCATABLE,DIMENSION(:)::MFDCHZ
    INTEGER,ALLOCATABLE,DIMENSION(:)::MGWSER
    INTEGER,ALLOCATABLE,DIMENSION(:)::MGWTLAST
    INTEGER,ALLOCATABLE,DIMENSION(:)::MPSER
    INTEGER,ALLOCATABLE,DIMENSION(:)::MPTLAST
    INTEGER,ALLOCATABLE,DIMENSION(:)::MQCTL
    INTEGER,ALLOCATABLE,DIMENSION(:)::MQSER
    INTEGER,ALLOCATABLE,DIMENSION(:)::MQTLAST
    INTEGER,ALLOCATABLE,DIMENSION(:)::MQWRSR
    INTEGER,ALLOCATABLE,DIMENSION(:)::MQWRTLST
    INTEGER,ALLOCATABLE,DIMENSION(:)::MSVSED
    INTEGER,ALLOCATABLE,DIMENSION(:)::MSVSND
    INTEGER,ALLOCATABLE,DIMENSION(:)::MSVTOX
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTMSRA
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTMSRC
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTMSRP
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTMSRQ
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTMSRQE
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTMSRU
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTMSRUE
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTMSRUT
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTSCUR
    INTEGER,ALLOCATABLE,DIMENSION(:)::MTSSTSP
    INTEGER,ALLOCATABLE,DIMENSION(:)::MVEGL
    INTEGER,ALLOCATABLE,DIMENSION(:)::MVEGSER
    INTEGER,ALLOCATABLE,DIMENSION(:)::MVEGTLAST
    INTEGER,ALLOCATABLE,DIMENSION(:)::MVPSL
    !INTEGER,ALLOCATABLE,DIMENSION(:,:)::MWQCSR
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::MWQCTLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::MWQPSR
    INTEGER,ALLOCATABLE,DIMENSION(:)::MWQPTLT
    INTEGER,ALLOCATABLE,DIMENSION(:)::MWSER
    INTEGER,ALLOCATABLE,DIMENSION(:)::MWTLAST
    INTEGER,ALLOCATABLE,DIMENSION(:)::NATDRY
    INTEGER,ALLOCATABLE,DIMENSION(:)::NCHNC
    INTEGER,ALLOCATABLE,DIMENSION(:)::NCSER
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NCSERA
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NCSERE
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NCSERJP
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NCSERN
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NCSERQ
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NCSERS
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NCSERW
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NDWHT
    INTEGER,ALLOCATABLE,DIMENSION(:)::NGWSL
    INTEGER,ALLOCATABLE,DIMENSION(:)::NJEL
    INTEGER,ALLOCATABLE,DIMENSION(:)::NJPMX
    INTEGER,ALLOCATABLE,DIMENSION(:,:,:)::NLOE
    INTEGER,ALLOCATABLE,DIMENSION(:,:,:)::NLON
    INTEGER,ALLOCATABLE,DIMENSION(:,:,:)::NLOS
    INTEGER,ALLOCATABLE,DIMENSION(:,:,:)::NLOW
    INTEGER,ALLOCATABLE,DIMENSION(:)::NLRPDL
    INTEGER,ALLOCATABLE,DIMENSION(:)::NLRPDRT
    INTEGER,ALLOCATABLE,DIMENSION(:)::NPORTJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::NPSERE
    INTEGER,ALLOCATABLE,DIMENSION(:)::NPSERN
    INTEGER,ALLOCATABLE,DIMENSION(:)::NPSERS
    INTEGER,ALLOCATABLE,DIMENSION(:)::NPSERW
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQCMFD
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQCMFU
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQCMUL
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQCTLQ
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQCTYP
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQSERJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQSERQ
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQSMF
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQSMUL
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQWRMFD
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQWRMFU
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQWRSERJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::NQWRSERQ
    INTEGER,ALLOCATABLE,DIMENSION(:)::NSP2
    INTEGER,ALLOCATABLE,DIMENSION(:)::NTSCRE
    INTEGER,ALLOCATABLE,DIMENSION(:)::NTSCRN
    INTEGER,ALLOCATABLE,DIMENSION(:)::NTSCRS
    INTEGER,ALLOCATABLE,DIMENSION(:)::NTSCRW
    INTEGER,ALLOCATABLE,DIMENSION(:)::NTSSSS
    INTEGER,ALLOCATABLE,DIMENSION(:)::NTVSFP
    INTEGER,ALLOCATABLE,DIMENSION(:)::NUDJP
    INTEGER,ALLOCATABLE,DIMENSION(:)::NUDJPC
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NUMTMP
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NUTMP
    INTEGER,ALLOCATABLE,DIMENSION(:)::NVEGSERV
    !INTEGER,ALLOCATABLE,DIMENSION(:,:,:)::NWQLOE   ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:,:,:)::NWQLON   ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:,:,:)::NWQLOS   ! PMC - NOT USED
    !INTEGER,ALLOCATABLE,DIMENSION(:,:,:)::NWQLOW   ! PMC - NOT USED
    INTEGER,ALLOCATABLE,DIMENSION(:)::NXYSDAT
    INTEGER,ALLOCATABLE,DIMENSION(:)::NZPRJP
    !
    REAL A1H2SSM
    REAL A1NH4SM
    REAL A1NO3SM
    REAL A22H2SSM
    REAL A22NH4SM
    REAL A22NO3SM
    REAL A2H2SSM
    REAL A2NH4SM
    REAL A2NO3SM
    REAL ABMAX
    REAL ABMIN
    REAL ABMX
    REAL ABO
    REAL AC
    REAL AC2
    REAL ACS
    REAL ACS2
    REAL AHD
    REAL AHMAX
    REAL AHO
    REAL AMOBEG
    REAL AMOBEGE
    REAL AMOBEGO
    REAL AQJCH4SM
    REAL AQJH2SSM
    REAL AS
    REAL AS2
    REAL ASFZERD
    REAL AVCON
    REAL AVCON1
    REAL AVMAX
    REAL AVMIN
    REAL AVMX
    REAL AVO
    REAL B1H2SSM
    REAL B1NH4SM
    REAL B1NO3SM
    REAL B2H2SSM
    REAL B2NH4SM
    REAL B2NO3SM
    REAL BBEBEG
    REAL BBEBEGE
    REAL BBEBEGO
    REAL BBEOUT
    REAL BBEOUTE
    REAL BBEOUTO
    REAL BEDEX
    REAL BEDPORC
    REAL BELADJ
    REAL BELCVRT
    REAL BELVMIN
    REAL BENDAY
    REAL BETAF  ! *** DSLLC
    REAL BLBSNT
    REAL BMECH1
    REAL BMECH2
    REAL BMECH3
    REAL BMECH4
    REAL BMECH5
    REAL BMECH6
    REAL BSC
    REAL BSEDBEG
    REAL BSEDEND
    REAL BVOLBEG2T
    REAL BVOLOUT
    REAL CDLAT1
    REAL CDLAT2
    REAL CDLAT3
    REAL CDLON1
    REAL CDLON2
    REAL CDLON3
    REAL CF
    REAL CFCDCWQ
    REAL CFCDDWQ
    REAL CFCDGWQ
    REAL CFMAX
    REAL CK2FCX
    REAL CK2FCY
    REAL CK2UUC
    REAL CK2UUM
    REAL CK2UVC
    REAL CK2UVM
    REAL CK2VVC
    REAL CK2VVM
    REAL COEFTSBL
    REAL COEHEFF
    REAL COEHEFF2
    REAL CONVQ
    REAL CONVR
    REAL CONVV
    REAL CORDT
    REAL CSALR
    REAL CSODMSM
    REAL CSODSM
    REAL CTE1
    REAL CTE2
    REAL CTE3
    REAL CTURB
    REAL CTURB2
    REAL CTURB2B
    REAL CTURB3
    REAL CVTWHA
    REAL DABEDT
    REAL DAGWZ
    REAL DELT
    REAL DELTI
    REAL DEPSED
    REAL DEXP
    REAL DIASED
    REAL DMLMIN
    REAL DMULT
    REAL DSEDGMM
    REAL DSFLMNT
    REAL DSFLMXT
    REAL DS_LAT
    REAL DS_LONG
    REAL DT
    REAL DT2
    REAL DTD
    REAL DTDYN
    REAL DTDYN1
    REAL DTI
    REAL DTL1MN
    REAL DTL2MN
    REAL DTL3MN
    REAL DTMAX
    REAL DTMIN
    REAL DTSED
    REAL DTSSFAC
    REAL DTWQ
    REAL DTWQO2
    REAL DX
    REAL DY
    REAL DYE3DMA
    REAL DYE3DMI
    REAL DYEA
    REAL DYEBEG
    REAL DYEBEG2T
    REAL DYEBEGE
    REAL DYEBEGO
    REAL DYEBMO2T
    REAL DYEEND2T
    REAL DYEOUT
    REAL DYEOUT2T
    REAL DYEOUTE
    REAL DYEOUTO
    REAL DZ
    REAL DZI
    REAL DZS
    REAL ERR
    REAL ERRMAX
    REAL ERRMIN
    REAL ETIMEDAY
    REAL ETIMESEC
    REAL EVAPCVT
    REAL FILT3TL
    REAL FOURDPI
    REAL FSCORTBC
    REAL FSWRATF
    REAL G
    REAL GI
    REAL GID2
    REAL GJCH4SM
    REAL GP
    REAL GPDIASED
    REAL GPO
    REAL HADJ
    REAL HBEDAL
    REAL HBEDALMN
    REAL HBEDALX
    REAL HBEDMAX
    REAL HBEDMIN
    REAL HBFDCH
    REAL HCVRT
    REAL HDRY
    REAL HEQT
    REAL HMIN
    REAL HTBED1
    REAL HTBED2
    REAL HWET
    REAL PARADJ
    REAL PDGINIT
    REAL PI
    REAL PI2
    REAL PPEBEG
    REAL PPEBEGE
    REAL PPEBEGO
    REAL PPEOUT
    REAL PPEOUTE
    REAL PPEOUTO
    REAL QCHERR
    REAL QQLMIN
    REAL QQMIN
    REAL QXE
    REAL QXEVP
    REAL QXW
    REAL QXWVP
    REAL QYN
    REAL QYNVP
    REAL QYS
    REAL QYSVP
    REAL RAINCVT
    REAL RCHC
    REAL RCICM1
    REAL RCICM2
    REAL RCICM3
    REAL RCICM4
    REAL RCICM5
    REAL RCRCA1
    REAL RCRCA2
    REAL RCRCA3
    REAL RCRCA4
    REAL RCRCA5
    REAL REVC
    REAL RIFTRM
    REAL RITB
    REAL RITB1
    REAL RJDENSM
    REAL RJNITSM
    REAL RK2NO3SM
    REAL RKCWQ
    REAL RKDSFLT
    REAL RKDYE
    REAL RMLSHA
    REAL RMWET
    REAL RNEW
    REAL RNH4WQ_
    REAL RNO3WQ_
    REAL RNPOR
    REAL RNSODSM
    REAL ROLD
    REAL RP
    REAL RPADJ
    REAL RPIA
    REAL RSDERDE
    REAL RSDERDO
    REAL RSM1H2S
    REAL RSM1NH4
    REAL RSM1NO3
    REAL RSM2H2S
    REAL RSM2NH4
    REAL RSM2NO3
    REAL RSMSS
    REAL RSQ
    REAL RSQM
    REAL RSQMADJ
    REAL RSQMIA
    REAL RSWRSI
    REAL RSWRSR
    REAL RTLSHA
    REAL RTTLSHA
    REAL S2TL
    REAL S3TL
    REAL SAL3DMA
    REAL SAL3DMI
    REAL SALA
    REAL SALBEG
    REAL SALBEGE
    REAL SALBEGO
    REAL SALOUT
    REAL SALOUTE
    REAL SALOUTO
    REAL SBDLDA
    REAL SBDLDB
    REAL SBDLDG1
    REAL SBDLDG2
    REAL SBDLDG3
    REAL SBDLDG4
    REAL SBDLDP
    REAL SCALQ
    REAL SCALV
    REAL SED3DMA
    REAL SED3DMI
    REAL SEDBEG
    REAL SEDBMO
    REAL SEDCON1
    REAL SEDCON2
    REAL SEDCON3
    REAL SEDCON4
    REAL SEDEND
    REAL SEDERR
    REAL SEDIFF
    REAL SEDIN
    REAL SEDMDGM
    REAL SEDMDMN
    REAL SEDMDMX
    REAL SEDOUT
    REAL SEDVDRD
    REAL SEDVDRM
    REAL SEDVRDT
    REAL SELVMAX
    REAL SELZERD
    REAL SFATBTT
    REAL SFLA
    REAL SFLKILL
    REAL SFNTBET
    REAL SHSBEDMX
    REAL SK1H2SSM
    REAL SK1NH4SM
    REAL SK1NO3SM
    REAL SM1OKMDP
    REAL SMASSBEG
    REAL SMASSEND
    REAL SMASSIN
    REAL SMASSOUT
    REAL SMBST1
    REAL SMCH4S
    REAL SMCO2PO4
    REAL SMCO2SI
    REAL SMCSHSCH
    REAL SMDIFT
    REAL SMDP1SI
    REAL SMFD1H2S
    REAL SMFD1NH4
    REAL SMFD2H2S
    REAL SMFD2NH4
    REAL SMFD2PO4
    REAL SMFD2SI
    REAL SMFP1H2S
    REAL SMFP1NH4
    REAL SMFP2H2S
    REAL SMFP2NH4
    REAL SMFP2PO4
    REAL SMFP2SI
    REAL SMJ2H2S
    REAL SMJDSI
    REAL SMK1CH4
    REAL SMKBST
    REAL SMKMDP
    REAL SMKMNH4
    REAL SMKMO2N
    REAL SMKMPSI
    REAL SMM1
    REAL SMM2
    REAL SMO20
    REAL SMO2BS
    REAL SMO2C
    REAL SMO2JC
    REAL SMO2NH4
    REAL SMO2NO3
    REAL SMP2PO4
    REAL SMP2SI
    REAL SMPOCR
    REAL SMRBIBT
    REAL SMSAL0
    REAL SMSISAT
    REAL SND3DMA
    REAL SND3DMI
    REAL SNDDMX
    REAL SNDVDRD
    REAL SNLT
    REAL SOLFRDT
    REAL SOLSRDT
    REAL SSALMAX
    REAL SSEDBEG
    REAL SSEDEND
    REAL STDOCBC
    REAL STDOCWC
    REAL STPOCBC
    REAL STPOCWC
    REAL SWRATNF
    REAL SWRATNS
    REAL TASFSER
    REAL TAVB
    REAL TAVSFP
    REAL TBDYNSTP
    REAL TBEDIT
    REAL TBEGAN
    REAL TBEGIN
    REAL TCALTRAN
    REAL TCEXP
    REAL TCGRS
    REAL TCON
    REAL TCONG
    REAL TCSFSER
    REAL TCTMSR
    REAL TCVP
    REAL TDINTS
    REAL TEDUMP
    REAL TEM3DMA
    REAL TEM3DMI
    REAL TEMA
    REAL TEMO
    REAL TENDRNSEC
    REAL TFCAVG
    REAL THDMT
    REAL TIDALP
    REAL TIMEBF
    REAL TIMEDAY
    REAL TIMEHYD
    REAL TIMESEC
    REAL TIMESUM
    REAL TIMESUM2
    REAL TIMESUM3
    REAL TLRPD
    REAL TMISC
    REAL TMVSFP
    REAL TN
    REAL TNT
    REAL TOUTPUT
    REAL TOX3DMA
    REAL TOX3DMI
    REAL TPN
    REAL TPUV
    REAL TQCTL
    REAL TQQQ
    REAL TRELAXV
    REAL TSADV
    REAL TSCDA
    REAL TSDUMP
    REAL TSRSF
    REAL TSSED
    REAL TSSEDZLJ
    REAL TSSSF
    REAL TTBXY
    REAL TUVW
    REAL TVAL
    REAL TVDIF
    REAL TWQADV
    REAL TWQDIF
    REAL TWQKIN
    REAL TWQSED
    REAL UAG
    REAL UMOBEG
    REAL UMOBEGE
    REAL UMOBEGO
    REAL UMOOUT
    REAL UMOOUTE
    REAL UMOOUTO
    REAL UUEBEG
    REAL UUEBEGE
    REAL UUEBEGO
    REAL UUEOUT
    REAL UUEOUTE
    REAL UUEOUTO
    REAL UUU3DMA
    REAL UUU3DMI
    REAL UVEGSCL
    REAL VAG
    REAL VETZERD
    REAL VEXP
    REAL VISMUD
    REAL VISMUDST
    REAL VKC
    REAL VMOBEG
    REAL VMOBEGE
    REAL VMOBEGO
    REAL VMOOUT
    REAL VMOOUTE
    REAL VMOOUTO
    REAL VMULT
    REAL VOLBEG
    REAL VOLBEG2T
    REAL VOLBEGE
    REAL VOLBEGO
    REAL VOLMBEG
    REAL VOLMEND
    REAL VOLMIN
    REAL VOLMORPH2T
    REAL VOLMOUT
    REAL VOLOUT
    REAL VOLOUTE
    REAL VOLOUTO
    REAL VOLZERD
    REAL VVEBEG
    REAL VVEBEGE
    REAL VVEBEGO
    REAL VVEOUT
    REAL VVEOUTE
    REAL VVEOUTO
    REAL VVV3DMA
    REAL VVV3DMI
    REAL WAG
    REAL WINDH
    REAL WINTER_START
    REAL WINTER_END
    REAL WQAANOX
    REAL WQANCC
    REAL WQANCD
    REAL WQANCG
    REAL WQANCM
    REAL WQANDC
    REAL WQAOCR
    REAL WQAOCRPM
    REAL WQAOCRRM
    REAL WQAONT
    REAL WQAPCM
    REAL WQASCD
    REAL WQCHLC
    REAL WQCHLD
    REAL WQCHLG
    REAL WQCHLM
    REAL WQCIA
    REAL WQCIB
    REAL WQCIC
    REAL WQCIM
    REAL WQCP1PRM
    REAL WQCP2PRM
    REAL WQCP3PRM
    REAL WQDOPC
    REAL WQDOPD
    REAL WQDOPG
    REAL WQFCDC
    REAL WQFCDD
    REAL WQFCDG
    REAL WQFCDM
    REAL WQFCDP
    REAL WQFCDPM
    REAL WQFCLP
    REAL WQFCLPM
    REAL WQFCRP
    REAL WQFCRPM
    REAL WQFD
    REAL WQFNDC
    REAL WQFNDD
    REAL WQFNDG
    REAL WQFNDM
    REAL WQFNDP
    REAL WQFNDPM
    REAL WQFNIC
    REAL WQFNID
    REAL WQFNIG
    REAL WQFNIM
    REAL WQFNIP
    REAL WQFNIPM
    REAL WQFNLC
    REAL WQFNLD
    REAL WQFNLG
    REAL WQFNLM
    REAL WQFNLP
    REAL WQFNLPM
    REAL WQFNRC
    REAL WQFNRD
    REAL WQFNRG
    REAL WQFNRM
    REAL WQFNRP
    REAL WQFNRPM
    REAL WQFPDC
    REAL WQFPDD
    REAL WQFPDG
    REAL WQFPDM
    REAL WQFPDP
    REAL WQFPDPM
    REAL WQFPIC
    REAL WQFPID
    REAL WQFPIG
    REAL WQFPIM
    REAL WQFPIP
    REAL WQFPIPM
    REAL WQFPLC
    REAL WQFPLD
    REAL WQFPLG
    REAL WQFPLM
    REAL WQFPLP
    REAL WQFPLPM
    REAL WQFPRC
    REAL WQFPRD
    REAL WQFPRG
    REAL WQFPRM
    REAL WQFPRP
    REAL WQFPRPM
    REAL WQFSID
    REAL WQFSIP
    REAL WQFSPD
    REAL WQFSPP
    REAL WQI0
    REAL WQI0OPT
    REAL WQI1
    REAL WQI2
    REAL WQI3
    REAL WQISMIN
    REAL WQKDCALG
    REAL WQKDN
    REAL WQKDNALG
    REAL WQKDOTAM
    REAL WQKDP
    REAL WQKDPALG
    REAL WQKECHL
    REAL WQKEPOM
    REAL WQKETSS
    REAL WQKG1M
    REAL WQKG2M
    REAL WQKHBMF
    REAL WQKHCO2C
    REAL WQKHCO2G
    REAL WQKHCO2D
    REAL WQKHCO2M
    REAL WQKHDNN
    REAL WQKHNC
    REAL WQKHND
    REAL WQKHNDO
    REAL WQKHNG
    REAL WQKHNM
    REAL WQKHNN
    REAL WQKHORDO
    REAL WQKHPC
    REAL WQKHPD
    REAL WQKHPG
    REAL WQKHPM
    REAL WQKHRC
    REAL WQKHRD
    REAL WQKHRG
    REAL WQKHS
    REAL WQKLC
    REAL WQKLCALG
    REAL WQKLN
    REAL WQKLNALG
    REAL WQKLP
    REAL WQKLPALG
    REAL WQKPO4P
    REAL WQKRC
    REAL WQKRCALG
    REAL WQKRN
    REAL WQKRNALG
    REAL WQKRP
    REAL WQKRPALG
    REAL WQKSAP
    REAL WQKTBM
    REAL WQMCMIN
    REAL WQNITM
    REAL WQSTOX
    REAL WQTAMDMX
    REAL WQTMM1
    REAL WQTMM2
    REAL WQTDMIN
    REAL WQTDMAX
    REAL WQTDINC
    REAL WQTDsMIN
    REAL WQTDsMAX
    REAL WQTDsINC
    REAL WQTRG
    REAL WQWSM
    REAL WSFLSMT
    REAL WSFLSTT
    REAL WSHELE
    REAL WSHELN
    REAL WSMB
    REAL WSMH
    REAL WVDISH
    REAL WVDISV
    REAL WVFRQ
    REAL WVLSH
    REAL WVLSX
    REAL WVOLBEG2T
    REAL WVOLOUT
    REAL WVPRD
    REAL WWW3DMA
    REAL WWW3DMI
    REAL XSMDPMIN
    REAL ZBRADJ
    REAL ZBRCVRT
    REAL ZBRWALL
    REAL ZSSMAX
    REAL ZSSMIN
    REAL ZVAL
    !
    REAL ANGVPV(10)
    REAL DSFLMN(100)
    REAL DSFLMX(100)
    REAL FUNKH(1001)
    REAL RKDSFL(100)
    REAL RKHTAB(1001)
    REAL SBPLTV(7)
    REAL SFATBT(100)
    REAL SFNTBE(100)
    REAL SHPLTV(7)
    REAL TARRAY(2)
    REAL TSFSER(100)
    REAL WQATM(NTSWQVM)
    REAL WSFLSM(100)
    REAL WSFLST(100)
    !
    REAL,ALLOCATABLE,DIMENSION(:)::AAU
    REAL,ALLOCATABLE,DIMENSION(:)::AAV
    REAL,ALLOCATABLE,DIMENSION(:,:)::AB
    REAL,ALLOCATABLE,DIMENSION(:,:)::ABEFF
    REAL,ALLOCATABLE,DIMENSION(:,:)::ABLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::ACCWFLD
    REAL,ALLOCATABLE,DIMENSION(:)::ACCWX
    REAL,ALLOCATABLE,DIMENSION(:,:)::ACOEF
    REAL,ALLOCATABLE,DIMENSION(:)::AGWELV
    REAL,ALLOCATABLE,DIMENSION(:)::AGWELV1
    REAL,ALLOCATABLE,DIMENSION(:)::AGWELV2
    REAL,ALLOCATABLE,DIMENSION(:,:)::AH
    REAL,ALLOCATABLE,DIMENSION(:,:)::AHC
    REAL,ALLOCATABLE,DIMENSION(:,:)::AHU
    REAL,ALLOCATABLE,DIMENSION(:,:)::AHULPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::AHV
    REAL,ALLOCATABLE,DIMENSION(:,:)::AHVLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::ALOW
    REAL,ALLOCATABLE,DIMENSION(:)::ALPVEG
    REAL,ALLOCATABLE,DIMENSION(:)::AMCP
    REAL,ALLOCATABLE,DIMENSION(:,:)::AMCU
    REAL,ALLOCATABLE,DIMENSION(:)::AMCUE
    REAL,ALLOCATABLE,DIMENSION(:,:)::AMCV
    REAL,ALLOCATABLE,DIMENSION(:)::AMCVE
    REAL,ALLOCATABLE,DIMENSION(:)::AMPU
    REAL,ALLOCATABLE,DIMENSION(:)::AMPV
    REAL,ALLOCATABLE,DIMENSION(:)::AMSP
    REAL,ALLOCATABLE,DIMENSION(:,:)::AMSU
    REAL,ALLOCATABLE,DIMENSION(:)::AMSUE
    REAL,ALLOCATABLE,DIMENSION(:,:)::AMSV
    REAL,ALLOCATABLE,DIMENSION(:)::AMSVE
    REAL,ALLOCATABLE,DIMENSION(:)::ANGWRMFD
    REAL,ALLOCATABLE,DIMENSION(:)::AP
    REAL,ALLOCATABLE,DIMENSION(:)::APCG
    REAL,ALLOCATABLE,DIMENSION(:,:)::APT
    REAL,ALLOCATABLE,DIMENSION(:,:)::AQ
    REAL,ALLOCATABLE,DIMENSION(:)::AQCTL
    REAL,ALLOCATABLE,DIMENSION(:)::ASURFEL
    REAL,ALLOCATABLE,DIMENSION(:)::ATMP
    REAL,ALLOCATABLE,DIMENSION(:,:)::ATMWHT
    REAL,ALLOCATABLE,DIMENSION(:,:)::AV
    REAL,ALLOCATABLE,DIMENSION(:,:)::AVUI
    REAL,ALLOCATABLE,DIMENSION(:,:)::AVVI
    REAL,ALLOCATABLE,DIMENSION(:,:)::B
    REAL,ALLOCATABLE,DIMENSION(:,:)::B0
    REAL,ALLOCATABLE,DIMENSION(:,:)::B1
    REAL,ALLOCATABLE,DIMENSION(:,:)::B1DT1
    REAL,ALLOCATABLE,DIMENSION(:,:)::BBT
    REAL,ALLOCATABLE,DIMENSION(:)::BBU
    REAL,ALLOCATABLE,DIMENSION(:)::BBV
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::BCLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::BDENBED
    REAL,ALLOCATABLE,DIMENSION(:,:)::BDENBED1
    REAL,ALLOCATABLE,DIMENSION(:)::BDENBEDA
    REAL,ALLOCATABLE,DIMENSION(:)::BDENBEDA1
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::BDISP
    REAL,ALLOCATABLE,DIMENSION(:)::BDLPSQ
    REAL,ALLOCATABLE,DIMENSION(:)::BE
    REAL,ALLOCATABLE,DIMENSION(:,:)::BEDBINIT
    REAL,ALLOCATABLE,DIMENSION(:,:)::BEDBKDSV
    REAL,ALLOCATABLE,DIMENSION(:,:)::BEDDINIT
    REAL,ALLOCATABLE,DIMENSION(:,:)::BEDLINIT
    REAL,ALLOCATABLE,DIMENSION(:,:)::BEDPORSV
    REAL,ALLOCATABLE,DIMENSION(:,:)::BEDTHKSV
    REAL,ALLOCATABLE,DIMENSION(:,:)::BEDVDRSV
    REAL,ALLOCATABLE,DIMENSION(:)::BELAGW
    REAL,ALLOCATABLE,DIMENSION(:)::BELSURF
    REAL,ALLOCATABLE,DIMENSION(:)::BELV
    REAL,ALLOCATABLE,DIMENSION(:)::BELV1
    REAL,ALLOCATABLE,DIMENSION(:)::BELVB
    REAL,ALLOCATABLE,DIMENSION(:)::BETVEG
    REAL,ALLOCATABLE,DIMENSION(:)::BFBSTSUM
    REAL,ALLOCATABLE,DIMENSION(:)::BFCODSUM
    REAL,ALLOCATABLE,DIMENSION(:)::BFNH4SUM
    REAL,ALLOCATABLE,DIMENSION(:)::BFNO3SUM
    REAL,ALLOCATABLE,DIMENSION(:)::BFO2SUM
    REAL,ALLOCATABLE,DIMENSION(:)::BFPO4SUM
    REAL,ALLOCATABLE,DIMENSION(:)::BFSADSUM
    REAL,ALLOCATABLE,DIMENSION(:)::BFSMTSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::BH
    REAL,ALLOCATABLE,DIMENSION(:)::BI1
    REAL,ALLOCATABLE,DIMENSION(:)::BI2
    REAL,ALLOCATABLE,DIMENSION(:,:)::BLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::BMNN
    REAL,ALLOCATABLE,DIMENSION(:,:)::BOD5SUM
    REAL,ALLOCATABLE,DIMENSION(:)::BPVEG
    REAL,ALLOCATABLE,DIMENSION(:)::BQCMFD
    REAL,ALLOCATABLE,DIMENSION(:)::BQCMFU
    REAL,ALLOCATABLE,DIMENSION(:)::BQWRMFD
    REAL,ALLOCATABLE,DIMENSION(:)::BQWRMFU
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::BSLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::BTAUC
    REAL,ALLOCATABLE,DIMENSION(:,:)::BTLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::BTMP
    REAL,ALLOCATABLE,DIMENSION(:,:)::CAC
    !REAL,ALLOCATABLE,DIMENSION(:,:)::CAE  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::CAM  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::CAN  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::CAP  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::CAS  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::CAW  ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CBE
    REAL,ALLOCATABLE,DIMENSION(:)::CBEDTOTAL
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CBN
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CBS
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CBW
    REAL,ALLOCATABLE,DIMENSION(:)::CC
    REAL,ALLOCATABLE,DIMENSION(:)::CCC
    REAL,ALLOCATABLE,DIMENSION(:)::CCCC
    REAL,ALLOCATABLE,DIMENSION(:)::CCCCHH
    REAL,ALLOCATABLE,DIMENSION(:)::CCCCHU
    REAL,ALLOCATABLE,DIMENSION(:)::CCCCHV
    REAL,ALLOCATABLE,DIMENSION(:)::CCCI
    REAL,ALLOCATABLE,DIMENSION(:)::CCCOS
    REAL,ALLOCATABLE,DIMENSION(:)::CCCOS1
    REAL,ALLOCATABLE,DIMENSION(:)::CCE
    !REAL,ALLOCATABLE,DIMENSION(:)::CCEB  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::CCER  ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::CCI
    REAL,ALLOCATABLE,DIMENSION(:,:)::CCLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::CCN
    !REAL,ALLOCATABLE,DIMENSION(:)::CCNB  ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::CCNHTT
    !REAL,ALLOCATABLE,DIMENSION(:)::CCNR  ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::CCS
    !REAL,ALLOCATABLE,DIMENSION(:)::CCSB  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::CCSR  ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::CCW
    !REAL,ALLOCATABLE,DIMENSION(:)::CCWB  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::CCWR  ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::CDECAYB
    REAL,ALLOCATABLE,DIMENSION(:,:)::CDECAYW
    REAL,ALLOCATABLE,DIMENSION(:,:)::CDXDYW
    REAL,ALLOCATABLE,DIMENSION(:)::CDZD
    REAL,ALLOCATABLE,DIMENSION(:)::CDZF
    REAL,ALLOCATABLE,DIMENSION(:)::CDZKK
    REAL,ALLOCATABLE,DIMENSION(:)::CDZKKP
    REAL,ALLOCATABLE,DIMENSION(:)::CDZKMK
    REAL,ALLOCATABLE,DIMENSION(:)::CDZL
    REAL,ALLOCATABLE,DIMENSION(:)::CDZM
    REAL,ALLOCATABLE,DIMENSION(:)::CDZR
    REAL,ALLOCATABLE,DIMENSION(:)::CDZU
    REAL,ALLOCATABLE,DIMENSION(:)::CE
    !REAL,ALLOCATABLE,DIMENSION(:)::CEB     ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::CER     ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::CFLCAC
    REAL,ALLOCATABLE,DIMENSION(:,:)::CFLUUU
    REAL,ALLOCATABLE,DIMENSION(:,:)::CFLVVV
    REAL,ALLOCATABLE,DIMENSION(:,:)::CFLWWW
    REAL,ALLOCATABLE,DIMENSION(:)::CFRD
    REAL,ALLOCATABLE,DIMENSION(:)::CGEB
    REAL,ALLOCATABLE,DIMENSION(:)::CGER
    REAL,ALLOCATABLE,DIMENSION(:)::CGNB
    REAL,ALLOCATABLE,DIMENSION(:)::CGNR
    REAL,ALLOCATABLE,DIMENSION(:)::CGSB
    REAL,ALLOCATABLE,DIMENSION(:)::CGSR
    REAL,ALLOCATABLE,DIMENSION(:)::CGWB
    REAL,ALLOCATABLE,DIMENSION(:)::CGWR
    REAL,ALLOCATABLE,DIMENSION(:,:)::CH
    REAL,ALLOCATABLE,DIMENSION(:)::CHANFRIC
    REAL,ALLOCATABLE,DIMENSION(:)::CHANLEN
    REAL,ALLOCATABLE,DIMENSION(:,:)::CHLMMAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::CHLMMIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::CHLMSUM
    REAL,ALLOCATABLE,DIMENSION(:)::CLB
    REAL,ALLOCATABLE,DIMENSION(:)::CLEVAP
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CLOE
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CLON
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CLOS
    REAL,ALLOCATABLE,DIMENSION(:,:)::CLOUD
    REAL,ALLOCATABLE,DIMENSION(:)::CLOUDT
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CLOW
    REAL,ALLOCATABLE,DIMENSION(:)::CLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::CMAX
    REAL,ALLOCATABLE,DIMENSION(:)::CMB
    REAL,ALLOCATABLE,DIMENSION(:,:)::CMIN
    REAL,ALLOCATABLE,DIMENSION(:)::CN
    !REAL,ALLOCATABLE,DIMENSION(:)::CNB      ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::CNR      ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::CO2WQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::COEFK
    REAL,ALLOCATABLE,DIMENSION(:,:)::COEFSK
    REAL,ALLOCATABLE,DIMENSION(:,:)::CON2
    REAL,ALLOCATABLE,DIMENSION(:,:)::CONGW
    REAL,ALLOCATABLE,DIMENSION(:,:)::CONPARB
    REAL,ALLOCATABLE,DIMENSION(:,:)::CONPARBC
    REAL,ALLOCATABLE,DIMENSION(:,:)::CONPARW
    REAL,ALLOCATABLE,DIMENSION(:,:)::CONPARWC
    REAL,ALLOCATABLE,DIMENSION(:,:)::CONT
    REAL,ALLOCATABLE,DIMENSION(:)::COSEDHID
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICX
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICXN
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICXP
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICY
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICYN
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICYP
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICZ
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICZN
    REAL,ALLOCATABLE,DIMENSION(:,:)::COSMICZP
    REAL,ALLOCATABLE,DIMENSION(:,:)::CPFAM0
    REAL,ALLOCATABLE,DIMENSION(:,:)::CPFAM1
    REAL,ALLOCATABLE,DIMENSION(:,:)::CPFAM2
    REAL,ALLOCATABLE,DIMENSION(:,:)::CQBEDLOADX
    REAL,ALLOCATABLE,DIMENSION(:,:)::CQBEDLOADY
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CQCJP
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CQS
    REAL,ALLOCATABLE,DIMENSION(:)::CQSE
    REAL,ALLOCATABLE,DIMENSION(:,:)::CQWR
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CQWRSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::CQWRSERT
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNUU
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNUV
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNUW
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNVU
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNVV
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNVW
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNWU
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNWV
    REAL,ALLOCATABLE,DIMENSION(:,:)::CRNWW
    REAL,ALLOCATABLE,DIMENSION(:)::CS
    !REAL,ALLOCATABLE,DIMENSION(:)::CSB          ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:,:,:)::CSER
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CSERT
    !REAL,ALLOCATABLE,DIMENSION(:,:,:)::CSERTWQ  ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::CSHIELDS50
    REAL,ALLOCATABLE,DIMENSION(:,:)::CSLSHA
    !REAL,ALLOCATABLE,DIMENSION(:)::CSR          ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::CTAUC
    REAL,ALLOCATABLE,DIMENSION(:)::CTLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::CTMPDRY
    REAL,ALLOCATABLE,DIMENSION(:,:)::CTURBB1
    REAL,ALLOCATABLE,DIMENSION(:,:)::CTURBB2
    REAL,ALLOCATABLE,DIMENSION(:,:)::CU1
    REAL,ALLOCATABLE,DIMENSION(:,:)::CU2
    REAL,ALLOCATABLE,DIMENSION(:)::CUB
    REAL,ALLOCATABLE,DIMENSION(:,:)::CUDISPT
    REAL,ALLOCATABLE,DIMENSION(:)::CUE
    REAL,ALLOCATABLE,DIMENSION(:)::CUN
    REAL,ALLOCATABLE,DIMENSION(:,:)::CUPP
    REAL,ALLOCATABLE,DIMENSION(:)::CUU
    REAL,ALLOCATABLE,DIMENSION(:,:)::CVDISPT
    REAL,ALLOCATABLE,DIMENSION(:)::CVE
    REAL,ALLOCATABLE,DIMENSION(:)::CVN
    REAL,ALLOCATABLE,DIMENSION(:)::CVV
    REAL,ALLOCATABLE,DIMENSION(:)::CW
    !REAL,ALLOCATABLE,DIMENSION(:)::CWB      ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::CWQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::CWQ2
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CWQLOE
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CWQLON
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CWQLOS
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::CWQLOW
    !REAL,ALLOCATABLE,DIMENSION(:)::CWR       ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::CWRCJP
    REAL,ALLOCATABLE,DIMENSION(:,:)::CYASUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::DDOMAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::DDOMIN
    REAL,ALLOCATABLE,DIMENSION(:)::DEPSUM
    REAL,ALLOCATABLE,DIMENSION(:)::DERRB
    REAL,ALLOCATABLE,DIMENSION(:,:)::DIASUM
    REAL,ALLOCATABLE,DIMENSION(:)::DIFTOX
    REAL,ALLOCATABLE,DIMENSION(:)::DIFTOXS
    REAL,ALLOCATABLE,DIMENSION(:)::DJET
    REAL,ALLOCATABLE,DIMENSION(:)::DJPER
    REAL,ALLOCATABLE,DIMENSION(:)::DLAT
    REAL,ALLOCATABLE,DIMENSION(:)::DLON
    REAL,ALLOCATABLE,DIMENSION(:,:)::DML
    REAL,ALLOCATABLE,DIMENSION(:)::DMVSFP
    REAL,ALLOCATABLE,DIMENSION(:,:)::DOOSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::DOSSUM
    REAL,ALLOCATABLE,DIMENSION(:)::DPDIFTOX
    REAL,ALLOCATABLE,DIMENSION(:,:)::DSTRSE
    REAL,ALLOCATABLE,DIMENSION(:)::DTAUC
    REAL,ALLOCATABLE,DIMENSION(:,:)::DU
    REAL,ALLOCATABLE,DIMENSION(:,:)::DV
    REAL,ALLOCATABLE,DIMENSION(:)::DXDJ
    REAL,ALLOCATABLE,DIMENSION(:)::DXFP
    REAL,ALLOCATABLE,DIMENSION(:)::DXIU
    REAL,ALLOCATABLE,DIMENSION(:)::DXIV
    REAL,ALLOCATABLE,DIMENSION(:)::DXP
    REAL,ALLOCATABLE,DIMENSION(:)::DXU
    REAL,ALLOCATABLE,DIMENSION(:,:)::DXU1
    REAL,ALLOCATABLE,DIMENSION(:)::DXV
    REAL,ALLOCATABLE,DIMENSION(:,:)::DXV1
    REAL,ALLOCATABLE,DIMENSION(:)::DXXTCA
    REAL,ALLOCATABLE,DIMENSION(:)::DXYIP
    REAL,ALLOCATABLE,DIMENSION(:)::DXYIU
    REAL,ALLOCATABLE,DIMENSION(:)::DXYIV
    REAL,ALLOCATABLE,DIMENSION(:)::DXYP
    REAL,ALLOCATABLE,DIMENSION(:)::DXYTCA
    REAL,ALLOCATABLE,DIMENSION(:)::DXYU
    REAL,ALLOCATABLE,DIMENSION(:)::DXYV
    REAL,ALLOCATABLE,DIMENSION(:)::DYDI
    REAL,ALLOCATABLE,DIMENSION(:,:)::DYE
    REAL,ALLOCATABLE,DIMENSION(:,:)::DYE1
    REAL,ALLOCATABLE,DIMENSION(:,:)::DYEAD
    REAL,ALLOCATABLE,DIMENSION(:,:)::DYEINIT
    REAL,ALLOCATABLE,DIMENSION(:,:)::DYELPF
    REAL,ALLOCATABLE,DIMENSION(:)::DYFP
    REAL,ALLOCATABLE,DIMENSION(:)::DYIU
    REAL,ALLOCATABLE,DIMENSION(:)::DYIV
    REAL,ALLOCATABLE,DIMENSION(:)::DYP
    REAL,ALLOCATABLE,DIMENSION(:)::DYU
    REAL,ALLOCATABLE,DIMENSION(:,:)::DYU1
    REAL,ALLOCATABLE,DIMENSION(:)::DYV
    REAL,ALLOCATABLE,DIMENSION(:,:)::DYV1
    REAL,ALLOCATABLE,DIMENSION(:)::DYXTCA
    REAL,ALLOCATABLE,DIMENSION(:)::DYYTCA
    REAL,ALLOCATABLE,DIMENSION(:,:)::DZBTR
    REAL,ALLOCATABLE,DIMENSION(:,:)::DZBTR1
    REAL,ALLOCATABLE,DIMENSION(:)::DZC
    REAL,ALLOCATABLE,DIMENSION(:)::DZG
    REAL,ALLOCATABLE,DIMENSION(:)::DZIC
    REAL,ALLOCATABLE,DIMENSION(:)::DZIG
    REAL,ALLOCATABLE,DIMENSION(:)::DZIGSD4
    REAL,ALLOCATABLE,DIMENSION(:,:)::DZSUM
    REAL,ALLOCATABLE,DIMENSION(:)::DZWQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::EHXYS
    REAL,ALLOCATABLE,DIMENSION(:)::ETAUC
    REAL,ALLOCATABLE,DIMENSION(:,:)::EVAP
    REAL,ALLOCATABLE,DIMENSION(:)::EVAPGW
    REAL,ALLOCATABLE,DIMENSION(:)::EVAPSW
    REAL,ALLOCATABLE,DIMENSION(:)::EVAPT
    REAL,ALLOCATABLE,DIMENSION(:)::EVPGLPF
    REAL,ALLOCATABLE,DIMENSION(:)::EVPSLPF
    REAL,ALLOCATABLE,DIMENSION(:)::FACBEDL
    REAL,ALLOCATABLE,DIMENSION(:)::FACSUSL
    REAL,ALLOCATABLE,DIMENSION(:,:)::FBBX
    REAL,ALLOCATABLE,DIMENSION(:,:)::FBBY
    REAL,ALLOCATABLE,DIMENSION(:,:)::FBODYFX !Makai DA
    REAL,ALLOCATABLE,DIMENSION(:,:)::FBODYFY !Makai DA
    REAL,ALLOCATABLE,DIMENSION(:)::FBODYFXI !Makai DA
    REAL,ALLOCATABLE,DIMENSION(:)::FBODYFYI !Makai DA
    REAL,ALLOCATABLE,DIMENSION(:,:)::FCAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::FCAX1
    REAL,ALLOCATABLE,DIMENSION(:)::FCAX1E
    REAL,ALLOCATABLE,DIMENSION(:)::FCAXE
    REAL,ALLOCATABLE,DIMENSION(:,:)::FCAY
    REAL,ALLOCATABLE,DIMENSION(:,:)::FCAY1
    REAL,ALLOCATABLE,DIMENSION(:)::FCAY1E
    REAL,ALLOCATABLE,DIMENSION(:)::FCAYE
    REAL,ALLOCATABLE,DIMENSION(:)::FCORC
    REAL,ALLOCATABLE,DIMENSION(:,:)::PFPOCB
    REAL,ALLOCATABLE,DIMENSION(:,:)::FMDUX
    REAL,ALLOCATABLE,DIMENSION(:,:)::FMDUY
    REAL,ALLOCATABLE,DIMENSION(:,:)::FMDVX
    REAL,ALLOCATABLE,DIMENSION(:,:)::FMDVY
    REAL,ALLOCATABLE,DIMENSION(:)::FP
    REAL,ALLOCATABLE,DIMENSION(:)::FP1
    REAL,ALLOCATABLE,DIMENSION(:)::FPB
    REAL,ALLOCATABLE,DIMENSION(:)::FPGXE
    REAL,ALLOCATABLE,DIMENSION(:)::FPGYE
    REAL,ALLOCATABLE,DIMENSION(:,:)::PMCTESTX
    REAL,ALLOCATABLE,DIMENSION(:,:)::PMCTESTY
    REAL,ALLOCATABLE,DIMENSION(:,:)::FPOCB
    REAL,ALLOCATABLE,DIMENSION(:,:)::FPOCBST
    REAL,ALLOCATABLE,DIMENSION(:,:)::FPOCWST
    REAL,ALLOCATABLE,DIMENSION(:)::FPR
    REAL,ALLOCATABLE,DIMENSION(:)::FPROX
    REAL,ALLOCATABLE,DIMENSION(:)::FPRT
    REAL,ALLOCATABLE,DIMENSION(:)::FPTMP
    REAL,ALLOCATABLE,DIMENSION(:,:)::FQC
    REAL,ALLOCATABLE,DIMENSION(:,:)::FRACCOH
    REAL,ALLOCATABLE,DIMENSION(:,:)::FRACNON
    REAL,ALLOCATABLE,DIMENSION(:,:)::FSALASM
    REAL,ALLOCATABLE,DIMENSION(:)::FSCORTBCV
    REAL,ALLOCATABLE,DIMENSION(:,:)::FTEMASM
    REAL,ALLOCATABLE,DIMENSION(:,:)::FUDISP
    REAL,ALLOCATABLE,DIMENSION(:,:)::FUHDYATV
    REAL,ALLOCATABLE,DIMENSION(:)::FUHDYE
    REAL,ALLOCATABLE,DIMENSION(:,:)::FUHU
    REAL,ALLOCATABLE,DIMENSION(:,:)::FUHV
    REAL,ALLOCATABLE,DIMENSION(:,:)::FVDISP
    REAL,ALLOCATABLE,DIMENSION(:)::FVHDXE
    REAL,ALLOCATABLE,DIMENSION(:,:)::FVHU
    REAL,ALLOCATABLE,DIMENSION(:,:)::FVHV
    REAL,ALLOCATABLE,DIMENSION(:,:)::FVOLASM
    REAL,ALLOCATABLE,DIMENSION(:,:)::FWQQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::FWQQL
    REAL,ALLOCATABLE,DIMENSION(:,:)::FWU
    REAL,ALLOCATABLE,DIMENSION(:,:)::FWV
    REAL,ALLOCATABLE,DIMENSION(:,:)::FX
    REAL,ALLOCATABLE,DIMENSION(:)::FXE
    REAL,ALLOCATABLE,DIMENSION(:,:)::FXVEG
    REAL,ALLOCATABLE,DIMENSION(:)::FXVEGE
    REAL,ALLOCATABLE,DIMENSION(:,:)::FXWAVE
    REAL,ALLOCATABLE,DIMENSION(:,:)::FY
    REAL,ALLOCATABLE,DIMENSION(:)::FYE
    REAL,ALLOCATABLE,DIMENSION(:,:)::FYVEG
    REAL,ALLOCATABLE,DIMENSION(:)::FYVEGE
    REAL,ALLOCATABLE,DIMENSION(:,:)::FYWAVE
    REAL,ALLOCATABLE,DIMENSION(:)::FZU
    REAL,ALLOCATABLE,DIMENSION(:)::FZV
    REAL,ALLOCATABLE,DIMENSION(:)::GAMB
    REAL,ALLOCATABLE,DIMENSION(:,:)::GAMTMP
    REAL,ALLOCATABLE,DIMENSION(:)::GAMVEG
    REAL,ALLOCATABLE,DIMENSION(:,:)::GLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::GRNSUM
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::GWCSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::GWCSERT
    REAL,ALLOCATABLE,DIMENSION(:)::GWFAC
    REAL,ALLOCATABLE,DIMENSION(:)::GWLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::GWSER
    REAL,ALLOCATABLE,DIMENSION(:)::GWSERT
    REAL,ALLOCATABLE,DIMENSION(:)::H1P
    REAL,ALLOCATABLE,DIMENSION(:)::H1U
    REAL,ALLOCATABLE,DIMENSION(:)::H1UI
    REAL,ALLOCATABLE,DIMENSION(:)::H1V
    REAL,ALLOCATABLE,DIMENSION(:)::H1VI
    REAL,ALLOCATABLE,DIMENSION(:)::H2P
    REAL,ALLOCATABLE,DIMENSION(:)::H2WQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::HBED
    REAL,ALLOCATABLE,DIMENSION(:,:)::HBED1
    REAL,ALLOCATABLE,DIMENSION(:)::HBEDA
    REAL,ALLOCATABLE,DIMENSION(:)::HBEDA1
    REAL,ALLOCATABLE,DIMENSION(:)::HCTLDA
    REAL,ALLOCATABLE,DIMENSION(:)::HCTLDM
    REAL,ALLOCATABLE,DIMENSION(:)::HCTLUA
    REAL,ALLOCATABLE,DIMENSION(:)::HCTLUM
    REAL,ALLOCATABLE,DIMENSION(:)::HDFUFX
    REAL,ALLOCATABLE,DIMENSION(:)::HDFUFY
    REAL,ALLOCATABLE,DIMENSION(:)::HDFUF
    REAL,ALLOCATABLE,DIMENSION(:,:)::HDIFCTD
    REAL,ALLOCATABLE,DIMENSION(:,:)::HDIFCTL
    REAL,ALLOCATABLE,DIMENSION(:)::HGDH
    REAL,ALLOCATABLE,DIMENSION(:)::HLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::HLRPD
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::HLRPDF
    REAL,ALLOCATABLE,DIMENSION(:)::HMCW
    REAL,ALLOCATABLE,DIMENSION(:)::HMP
    REAL,ALLOCATABLE,DIMENSION(:)::HMPW
    REAL,ALLOCATABLE,DIMENSION(:)::HMU
    REAL,ALLOCATABLE,DIMENSION(:)::HMUW
    REAL,ALLOCATABLE,DIMENSION(:)::HMV
    REAL,ALLOCATABLE,DIMENSION(:)::HMVW
    REAL,ALLOCATABLE,DIMENSION(:)::HP
    REAL,ALLOCATABLE,DIMENSION(:)::HPI
    REAL,ALLOCATABLE,DIMENSION(:)::HPTMP
    REAL,ALLOCATABLE,DIMENSION(:)::HPVEG
    REAL,ALLOCATABLE,DIMENSION(:)::HRU
    REAL,ALLOCATABLE,DIMENSION(:)::HRUO
    REAL,ALLOCATABLE,DIMENSION(:)::HRV
    REAL,ALLOCATABLE,DIMENSION(:)::HRVO
    !REAL,ALLOCATABLE,DIMENSION(:)::HRXYU   ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::HRXYV   ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::HTMP
    REAL,ALLOCATABLE,DIMENSION(:)::HU
    REAL,ALLOCATABLE,DIMENSION(:)::HUDRY
    REAL,ALLOCATABLE,DIMENSION(:)::HUI
    REAL,ALLOCATABLE,DIMENSION(:)::HUTMP
    REAL,ALLOCATABLE,DIMENSION(:)::HUWET
    REAL,ALLOCATABLE,DIMENSION(:)::HV
    REAL,ALLOCATABLE,DIMENSION(:)::HVDRY
    REAL,ALLOCATABLE,DIMENSION(:)::HVI
    REAL,ALLOCATABLE,DIMENSION(:)::HVTMP
    REAL,ALLOCATABLE,DIMENSION(:)::HVWET
    REAL,ALLOCATABLE,DIMENSION(:)::HWQ
    REAL,ALLOCATABLE,DIMENSION(:)::HWQI
    REAL,ALLOCATABLE,DIMENSION(:,:)::HYDCN
    REAL,ALLOCATABLE,DIMENSION(:)::O2WQ
    REAL,ALLOCATABLE,DIMENSION(:)::OBCLIST
    REAL,ALLOCATABLE,DIMENSION(:)::P
    REAL,ALLOCATABLE,DIMENSION(:)::P1
    REAL,ALLOCATABLE,DIMENSION(:)::P1DT1
    REAL,ALLOCATABLE,DIMENSION(:)::PAM
    REAL,ALLOCATABLE,DIMENSION(:,:)::PATM
    REAL,ALLOCATABLE,DIMENSION(:)::PATMT
    !REAL,ALLOCATABLE,DIMENSION(:)::PBLK   ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::PBTMP  ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCBE
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCBN
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCBS
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCBW
    REAL,ALLOCATABLE,DIMENSION(:)::PCG
    !REAL,ALLOCATABLE,DIMENSION(:)::PCGE   ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::PCGN   ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::PCGS   ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::PCGW   ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::PDIFTOX
    !REAL,ALLOCATABLE,DIMENSION(:)::PE     ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::PEXP
    REAL,ALLOCATABLE,DIMENSION(:,:)::PFAM
    REAL,ALLOCATABLE,DIMENSION(:,:)::PFAM1
    REAL,ALLOCATABLE,DIMENSION(:,:)::PFAM2
    REAL,ALLOCATABLE,DIMENSION(:,:)::PFPH
    REAL,ALLOCATABLE,DIMENSION(:,:)::PFPH1
    REAL,ALLOCATABLE,DIMENSION(:,:)::PFPH2
    REAL,ALLOCATABLE,DIMENSION(:)::PHASEE
    REAL,ALLOCATABLE,DIMENSION(:)::PHASEU
    REAL,ALLOCATABLE,DIMENSION(:)::PHASEV
    REAL,ALLOCATABLE,DIMENSION(:,:)::PHID
    REAL,ALLOCATABLE,DIMENSION(:)::PHJET
    REAL,ALLOCATABLE,DIMENSION(:)::PLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::PMDCH
    REAL,ALLOCATABLE,DIMENSION(:)::PN
    REAL,ALLOCATABLE,DIMENSION(:,:)::PNHYDS
    REAL,ALLOCATABLE,DIMENSION(:)::PO4DWQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::PO4DWQSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::POCMAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::POCMIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::POCSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::PONMAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::PONMIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::PONSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::POPMAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::POPMIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::POPSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::PORBED
    REAL,ALLOCATABLE,DIMENSION(:,:)::PORBED1
    !REAL,ALLOCATABLE,DIMENSION(:)::PORBEDA    ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::PORBEDA1   ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::PPH
    !REAL,ALLOCATABLE,DIMENSION(:)::PRED       ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::PRESE    ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::PRESH    ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::PREST    ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::PRODSUM
    !REAL,ALLOCATABLE,DIMENSION(:)::PS         ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSBE
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSBN
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSBS
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSBW
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSER
    REAL,ALLOCATABLE,DIMENSION(:)::PSERT
    REAL,ALLOCATABLE,DIMENSION(:)::PSHADE
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::PTLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::PTMP
    REAL,ALLOCATABLE,DIMENSION(:)::PVEGX
    REAL,ALLOCATABLE,DIMENSION(:)::PVEGY
    REAL,ALLOCATABLE,DIMENSION(:)::PVEGZ
    !REAL,ALLOCATABLE,DIMENSION(:)::PW      ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::QBEDS   ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::QBEDW   ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::QCELLCTR
    REAL,ALLOCATABLE,DIMENSION(:,:)::QCH
    REAL,ALLOCATABLE,DIMENSION(:)::QCHANU
    REAL,ALLOCATABLE,DIMENSION(:)::QCHANUN
    REAL,ALLOCATABLE,DIMENSION(:)::QCHANV
    REAL,ALLOCATABLE,DIMENSION(:)::QCHANVN
    REAL,ALLOCATABLE,DIMENSION(:)::QCHNULP
    REAL,ALLOCATABLE,DIMENSION(:)::QCHNVLP
    REAL,ALLOCATABLE,DIMENSION(:,:)::QCOEF
    REAL,ALLOCATABLE,DIMENSION(:,:,:,:)::QCTL
    REAL,ALLOCATABLE,DIMENSION(:,:)::QCTLST
    REAL,ALLOCATABLE,DIMENSION(:,:)::QCTLSTO
    REAL,ALLOCATABLE,DIMENSION(:,:)::QCTLT
    REAL,ALLOCATABLE,DIMENSION(:,:)::QCTLTLP
    REAL,ALLOCATABLE,DIMENSION(:,:)::QCTLTO
    REAL,ALLOCATABLE,DIMENSION(:)::QDWASTE
    !REAL,ALLOCATABLE,DIMENSION(:)::QEVAP    ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::QFACTOR
    REAL,ALLOCATABLE,DIMENSION(:)::QGW
    REAL,ALLOCATABLE,DIMENSION(:,:)::QJPENT
    REAL,ALLOCATABLE,DIMENSION(:)::QJPENTT
    REAL,ALLOCATABLE,DIMENSION(:)::QMORPH
    REAL,ALLOCATABLE,DIMENSION(:,:)::QQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::QQ1
    REAL,ALLOCATABLE,DIMENSION(:,:)::QQ2
    REAL,ALLOCATABLE,DIMENSION(:,:)::QQSQR
    REAL,ALLOCATABLE,DIMENSION(:)::QQCJP
    REAL,ALLOCATABLE,DIMENSION(:)::QQI
    REAL,ALLOCATABLE,DIMENSION(:,:)::QQL
    REAL,ALLOCATABLE,DIMENSION(:,:)::QQL1
    REAL,ALLOCATABLE,DIMENSION(:,:)::QQL2
    !REAL,ALLOCATABLE,DIMENSION(:)::QQVSE     ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::QQWC
    REAL,ALLOCATABLE,DIMENSION(:)::QQWCR
    REAL,ALLOCATABLE,DIMENSION(:)::QQWV1
    REAL,ALLOCATABLE,DIMENSION(:)::QQWV2
    REAL,ALLOCATABLE,DIMENSION(:)::QQWV3
    REAL,ALLOCATABLE,DIMENSION(:)::QRAIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSBDLDIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSBDLDOT
    REAL,ALLOCATABLE,DIMENSION(:)::QSBDLDP
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSBDLDX
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSBDLDY
    REAL,ALLOCATABLE,DIMENSION(:)::QSBDTOP
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::QSEDBED
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::QSEDBED1
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSEDBEDA
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSEDBEDA1
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::QSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSERCELL
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSERT
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSRTLPN
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSRTLPP
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSS
    REAL,ALLOCATABLE,DIMENSION(:)::QSSDPA
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSUM
    REAL,ALLOCATABLE,DIMENSION(:)::QSUME
    REAL,ALLOCATABLE,DIMENSION(:)::QSUMELPF
    !REAL,ALLOCATABLE,DIMENSION(:)::QSUMELPN   ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::QSUMELPP   ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::QSUMEN     ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::QSUM1E
    REAL,ALLOCATABLE,DIMENSION(:,:)::QSUMLPF
    !REAL,ALLOCATABLE,DIMENSION(:,:)::QSUMLPN  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::QSUMLPP  ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::QSUMN    ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::QSUMP    ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::QWATPA
    REAL,ALLOCATABLE,DIMENSION(:)::QWBDTOP
    REAL,ALLOCATABLE,DIMENSION(:)::QWR
    REAL,ALLOCATABLE,DIMENSION(:)::QWRCJP
    REAL,ALLOCATABLE,DIMENSION(:,:)::QWRSER
    REAL,ALLOCATABLE,DIMENSION(:)::QWRSERT
    REAL,ALLOCATABLE,DIMENSION(:)::QWRSERTLP
    REAL,ALLOCATABLE,DIMENSION(:,:)::QWTRBED
    REAL,ALLOCATABLE,DIMENSION(:,:)::QWTRBED1
    REAL,ALLOCATABLE,DIMENSION(:)::QWTRBEDA
    REAL,ALLOCATABLE,DIMENSION(:)::QWTRBEDA1
    !REAL,ALLOCATABLE,DIMENSION(:)::QXXSUM    ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::QYYSUM    ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::RA4       ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::RAIN
    REAL,ALLOCATABLE,DIMENSION(:)::RAINLPF
    REAL,ALLOCATABLE,DIMENSION(:)::RAINT
    REAL,ALLOCATABLE,DIMENSION(:)::RBPSBL
    REAL,ALLOCATABLE,DIMENSION(:)::RCG
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICX
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICXN
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICXP
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICY
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICYN
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICYP
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICZ
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICZN
    REAL,ALLOCATABLE,DIMENSION(:,:)::RCOSMICZP
    REAL,ALLOCATABLE,DIMENSION(:)::RCX
    REAL,ALLOCATABLE,DIMENSION(:)::RCY
    REAL,ALLOCATABLE,DIMENSION(:)::RDLPSQ
    REAL,ALLOCATABLE,DIMENSION(:)::REAC
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::RESPSUM
    REAL,ALLOCATABLE,DIMENSION(:)::RHA
    REAL,ALLOCATABLE,DIMENSION(:)::RHS
    REAL,ALLOCATABLE,DIMENSION(:)::RI
    REAL,ALLOCATABLE,DIMENSION(:)::RIFTR
    REAL,ALLOCATABLE,DIMENSION(:)::RINFLPF
    REAL,ALLOCATABLE,DIMENSION(:)::RJ
    REAL,ALLOCATABLE,DIMENSION(:)::RK
    REAL,ALLOCATABLE,DIMENSION(:,:)::RKASUM
    REAL,ALLOCATABLE,DIMENSION(:)::RKTOXB
    REAL,ALLOCATABLE,DIMENSION(:)::RKTOXP
    REAL,ALLOCATABLE,DIMENSION(:)::RKTOXW
    REAL,ALLOCATABLE,DIMENSION(:,:)::RLIGHTC
    REAL,ALLOCATABLE,DIMENSION(:,:)::RLIGHTT
    REAL,ALLOCATABLE,DIMENSION(:)::RMAJ
    REAL,ALLOCATABLE,DIMENSION(:)::RMIN
    REAL,ALLOCATABLE,DIMENSION(:)::RMOLTX
    REAL,ALLOCATABLE,DIMENSION(:)::RNH4NO3
    REAL,ALLOCATABLE,DIMENSION(:)::RNH4WQ
    REAL,ALLOCATABLE,DIMENSION(:)::RNO3WQ
    REAL,ALLOCATABLE,DIMENSION(:)::ROUSE
    REAL,ALLOCATABLE,DIMENSION(:)::RQCMUL
    REAL,ALLOCATABLE,DIMENSION(:)::RQSMUL
    REAL,ALLOCATABLE,DIMENSION(:,:)::RRHS
    !REAL,ALLOCATABLE,DIMENSION(:)::RSDB      ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::RSDR      ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:,:)::RSDZ    ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::RSEDERE2T
    REAL,ALLOCATABLE,DIMENSION(:)::RSEDERE2TB
    REAL,ALLOCATABLE,DIMENSION(:)::RSEDERE2TW
    REAL,ALLOCATABLE,DIMENSION(:)::RSEDERO2T
    REAL,ALLOCATABLE,DIMENSION(:)::RSEDERO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::RSEDERO2TW
    REAL,ALLOCATABLE,DIMENSION(:)::RSNDERE2T
    REAL,ALLOCATABLE,DIMENSION(:)::RSNDERE2TB
    REAL,ALLOCATABLE,DIMENSION(:)::RSNDERE2TW
    REAL,ALLOCATABLE,DIMENSION(:)::RSNDERO2T
    REAL,ALLOCATABLE,DIMENSION(:)::RSNDERO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::RSNDERO2TW
    REAL,ALLOCATABLE,DIMENSION(:)::RSNDM
    REAL,ALLOCATABLE,DIMENSION(:)::RSOL
    REAL,ALLOCATABLE,DIMENSION(:)::RSSBCE
    REAL,ALLOCATABLE,DIMENSION(:)::RSSBCN
    REAL,ALLOCATABLE,DIMENSION(:)::RSSBCS
    REAL,ALLOCATABLE,DIMENSION(:)::RSSBCW
    !REAL,ALLOCATABLE,DIMENSION(:)::RTMP       ! PMC - NOT USED
    !REAL,ALLOCATABLE,DIMENSION(:)::RTMP1      ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::RTOXERE2T
    REAL,ALLOCATABLE,DIMENSION(:)::RTOXERE2TB
    REAL,ALLOCATABLE,DIMENSION(:)::RTOXERE2TW
    REAL,ALLOCATABLE,DIMENSION(:)::RTOXERO2T
    REAL,ALLOCATABLE,DIMENSION(:)::RTOXERO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::RTOXERO2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:,:)::RTXBSDB
    REAL,ALLOCATABLE,DIMENSION(:)::SAAX
    REAL,ALLOCATABLE,DIMENSION(:)::SAAY
    REAL,ALLOCATABLE,DIMENSION(:,:)::SADWQMAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::SADWQMIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::SADWQSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::SAL
    REAL,ALLOCATABLE,DIMENSION(:,:)::SAL1
    REAL,ALLOCATABLE,DIMENSION(:,:)::SALAD
    REAL,ALLOCATABLE,DIMENSION(:,:)::SALINIT
    REAL,ALLOCATABLE,DIMENSION(:,:)::SALLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::SALMN
    REAL,ALLOCATABLE,DIMENSION(:,:)::SALMX
    REAL,ALLOCATABLE,DIMENSION(:,:)::SALSUM
    REAL,ALLOCATABLE,DIMENSION(:)::SBLOUT2T
    REAL,ALLOCATABLE,DIMENSION(:)::SBLOUT2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SBLOUT2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SBX
    REAL,ALLOCATABLE,DIMENSION(:)::SBXO
    REAL,ALLOCATABLE,DIMENSION(:)::SBY
    REAL,ALLOCATABLE,DIMENSION(:)::SBYO
    REAL,ALLOCATABLE,DIMENSION(:)::SCAX
    REAL,ALLOCATABLE,DIMENSION(:)::SCAY
    REAL,ALLOCATABLE,DIMENSION(:)::SCB
    REAL,ALLOCATABLE,DIMENSION(:,:)::SCLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::SCVEG
    REAL,ALLOCATABLE,DIMENSION(:)::SDBLV
    REAL,ALLOCATABLE,DIMENSION(:)::SDEN
    REAL,ALLOCATABLE,DIMENSION(:)::SDX
    REAL,ALLOCATABLE,DIMENSION(:)::SDY
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SED
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SED1
    REAL,ALLOCATABLE,DIMENSION(:)::SED3DMAX
    REAL,ALLOCATABLE,DIMENSION(:)::SED3DMIN
    REAL,ALLOCATABLE,DIMENSION(:)::SEDA
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDAD
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDB
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDB1
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDBA
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDBA1
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDBALL
    REAL,ALLOCATABLE,DIMENSION(:)::SEDBAT
    REAL,ALLOCATABLE,DIMENSION(:)::SEDBEG2T
    REAL,ALLOCATABLE,DIMENSION(:)::SEDBEG2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SEDBEG2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDBINIT
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDBLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SEDBMO2T
    REAL,ALLOCATABLE,DIMENSION(:)::SEDBMO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SEDBMO2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SEDBO
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDBS
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDBT
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDBTLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SEDDIA
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDDIA50
    REAL,ALLOCATABLE,DIMENSION(:)::SEDEND2T
    REAL,ALLOCATABLE,DIMENSION(:)::SEDEND2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SEDEND2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERE2T
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERE2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERE2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERO2T
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERO2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERR2T
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERR2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SEDERR2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDF
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDFDTAN
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDFDTAP
    REAL,ALLOCATABLE,DIMENSION(:)::SEDFLUX2T
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDFPA
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDINIT
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SEDN
    REAL,ALLOCATABLE,DIMENSION(:)::SEDO
    REAL,ALLOCATABLE,DIMENSION(:)::SEDOUT2T
    REAL,ALLOCATABLE,DIMENSION(:)::SEDOUT2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SEDOUT2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SEDPHI
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SEDS
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDT
    REAL,ALLOCATABLE,DIMENSION(:,:)::SEDTLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SELSUM
    REAL,ALLOCATABLE,DIMENSION(:)::SEXP
    REAL,ALLOCATABLE,DIMENSION(:,:)::SFL
    REAL,ALLOCATABLE,DIMENSION(:,:)::SFL2
    REAL,ALLOCATABLE,DIMENSION(:,:)::SFLAD
    REAL,ALLOCATABLE,DIMENSION(:,:)::SFLINIT
    REAL,ALLOCATABLE,DIMENSION(:,:)::SFLLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SFLSBOT
    REAL,ALLOCATABLE,DIMENSION(:,:)::SGSM1
    REAL,ALLOCATABLE,DIMENSION(:,:)::SIGPHI
    REAL,ALLOCATABLE,DIMENSION(:)::SIGPHIA
    REAL,ALLOCATABLE,DIMENSION(:)::SKTOXP
    REAL,ALLOCATABLE,DIMENSION(:)::SLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::SM1DIFT
    REAL,ALLOCATABLE,DIMENSION(:)::SM1H2S
    REAL,ALLOCATABLE,DIMENSION(:)::SM1NH4
    REAL,ALLOCATABLE,DIMENSION(:)::SM1NO3
    REAL,ALLOCATABLE,DIMENSION(:)::SM1PO4
    REAL,ALLOCATABLE,DIMENSION(:)::SM1SI
    REAL,ALLOCATABLE,DIMENSION(:)::SM2DIFT
    REAL,ALLOCATABLE,DIMENSION(:)::SM2H2S
    REAL,ALLOCATABLE,DIMENSION(:)::SM2NH4
    REAL,ALLOCATABLE,DIMENSION(:)::SM2NO3
    REAL,ALLOCATABLE,DIMENSION(:)::SM2PO4
    REAL,ALLOCATABLE,DIMENSION(:)::SM2SI
    REAL,ALLOCATABLE,DIMENSION(:)::SMAC
    REAL,ALLOCATABLE,DIMENSION(:)::SMBST
    REAL,ALLOCATABLE,DIMENSION(:)::SMCSOD
    REAL,ALLOCATABLE,DIMENSION(:)::SMD1PO4
    REAL,ALLOCATABLE,DIMENSION(:)::SMD1SI
    REAL,ALLOCATABLE,DIMENSION(:)::SMDD
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMDFC
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMDFN
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMDFP
    REAL,ALLOCATABLE,DIMENSION(:)::SMDFSI
    REAL,ALLOCATABLE,DIMENSION(:)::SMDGFC
    REAL,ALLOCATABLE,DIMENSION(:)::SMDGFN
    REAL,ALLOCATABLE,DIMENSION(:)::SMDGFP
    REAL,ALLOCATABLE,DIMENSION(:)::SMDP
    REAL,ALLOCATABLE,DIMENSION(:)::SMDP1PO4
    REAL,ALLOCATABLE,DIMENSION(:)::SMDPMIN
    REAL,ALLOCATABLE,DIMENSION(:)::SMDTOH
    REAL,ALLOCATABLE,DIMENSION(:)::SMFCBC
    REAL,ALLOCATABLE,DIMENSION(:)::SMFCBD
    REAL,ALLOCATABLE,DIMENSION(:)::SMFCBG
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMFCR
    REAL,ALLOCATABLE,DIMENSION(:)::SMFNBC
    REAL,ALLOCATABLE,DIMENSION(:)::SMFNBD
    REAL,ALLOCATABLE,DIMENSION(:)::SMFNBG
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMFNR
    REAL,ALLOCATABLE,DIMENSION(:)::SMFPBC
    REAL,ALLOCATABLE,DIMENSION(:)::SMFPBD
    REAL,ALLOCATABLE,DIMENSION(:)::SMFPBG
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMFPR
    REAL,ALLOCATABLE,DIMENSION(:)::SMHODT
    REAL,ALLOCATABLE,DIMENSION(:)::SMHSED
    REAL,ALLOCATABLE,DIMENSION(:)::SMJAQH2S
    REAL,ALLOCATABLE,DIMENSION(:)::SMJDEN
    REAL,ALLOCATABLE,DIMENSION(:)::SMJGCH4
    REAL,ALLOCATABLE,DIMENSION(:)::SMJNIT
    REAL,ALLOCATABLE,DIMENSION(:)::SMK1H2S
    REAL,ALLOCATABLE,DIMENSION(:)::SMK1NO3
    REAL,ALLOCATABLE,DIMENSION(:)::SMK2NO3
    REAL,ALLOCATABLE,DIMENSION(:)::SMKL12
    REAL,ALLOCATABLE,DIMENSION(:)::SMKNH4
    REAL,ALLOCATABLE,DIMENSION(:)::SMNSOD
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMPOC
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMPON
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMPOP
    REAL,ALLOCATABLE,DIMENSION(:)::SMPSI
    REAL,ALLOCATABLE,DIMENSION(:)::SMSS
    REAL,ALLOCATABLE,DIMENSION(:)::SMT
    REAL,ALLOCATABLE,DIMENSION(:)::SMTD1CH4
    REAL,ALLOCATABLE,DIMENSION(:)::SMTD2CH4
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMTDCD
    REAL,ALLOCATABLE,DIMENSION(:)::SMTDDD
    REAL,ALLOCATABLE,DIMENSION(:)::SMTDDP
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMTDND
    REAL,ALLOCATABLE,DIMENSION(:)::SMTDNH4
    REAL,ALLOCATABLE,DIMENSION(:)::SMTDNO3
    REAL,ALLOCATABLE,DIMENSION(:,:)::SMTDPD
    REAL,ALLOCATABLE,DIMENSION(:)::SMTDSI
    REAL,ALLOCATABLE,DIMENSION(:)::SMTMP
    REAL,ALLOCATABLE,DIMENSION(:)::SMW12
    REAL,ALLOCATABLE,DIMENSION(:)::SMW2
    REAL,ALLOCATABLE,DIMENSION(:)::SMW2DTOH
    REAL,ALLOCATABLE,DIMENSION(:)::SMW2PHODT
    REAL,ALLOCATABLE,DIMENSION(:)::SNAPSHOTS
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SND
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SND1
    REAL,ALLOCATABLE,DIMENSION(:)::SND3DMAX
    REAL,ALLOCATABLE,DIMENSION(:)::SND3DMIN
    REAL,ALLOCATABLE,DIMENSION(:)::SNDA
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDAD
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDB
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDB1
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDBA
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDBA1
    REAL,ALLOCATABLE,DIMENSION(:)::SNDBAT
    REAL,ALLOCATABLE,DIMENSION(:)::SNDBEG2T
    REAL,ALLOCATABLE,DIMENSION(:)::SNDBEG2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SNDBEG2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDBINIT
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDBLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SNDBMO2T
    REAL,ALLOCATABLE,DIMENSION(:)::SNDBMO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SNDBMO2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDBS
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDBT
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDBTLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SNDEND2T
    REAL,ALLOCATABLE,DIMENSION(:)::SNDEND2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SNDEND2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SNDEQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDEQSAV
    REAL,ALLOCATABLE,DIMENSION(:)::SNDEQB
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERE2T
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERE2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERE2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERO2T
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERO2TW
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERR2T
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERR2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SNDERR2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDF
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDFBL
    REAL,ALLOCATABLE,DIMENSION(:)::SNDFBL2T
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDFDTAN
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDFDTAP
    REAL,ALLOCATABLE,DIMENSION(:)::SNDFLUX2T
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDFPA
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDINIT
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SNDOUT2T
    REAL,ALLOCATABLE,DIMENSION(:)::SNDOUT2TB
    REAL,ALLOCATABLE,DIMENSION(:)::SNDOUT2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::SNDS
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDT
    REAL,ALLOCATABLE,DIMENSION(:,:)::SNDTLPF
    REAL,ALLOCATABLE,DIMENSION(:)::SNLPX
    REAL,ALLOCATABLE,DIMENSION(:)::SNLPY
    REAL,ALLOCATABLE,DIMENSION(:)::SODMULT
    REAL,ALLOCATABLE,DIMENSION(:,:)::SODSUM
    REAL,ALLOCATABLE,DIMENSION(:)::SOLFRD
    REAL,ALLOCATABLE,DIMENSION(:)::SOLSRD
    REAL,ALLOCATABLE,DIMENSION(:,:)::SOLSWR
    REAL,ALLOCATABLE,DIMENSION(:)::SOLSWRT
    REAL,ALLOCATABLE,DIMENSION(:)::SPB
    REAL,ALLOCATABLE,DIMENSION(:)::SPBE1
    REAL,ALLOCATABLE,DIMENSION(:)::SPBE2
    REAL,ALLOCATABLE,DIMENSION(:)::SPBN1
    REAL,ALLOCATABLE,DIMENSION(:)::SPBN2
    REAL,ALLOCATABLE,DIMENSION(:)::SPBS1
    REAL,ALLOCATABLE,DIMENSION(:)::SPBS2
    REAL,ALLOCATABLE,DIMENSION(:)::SPBW1
    REAL,ALLOCATABLE,DIMENSION(:)::SPBW2
    REAL,ALLOCATABLE,DIMENSION(:,:)::SPFAM0
    REAL,ALLOCATABLE,DIMENSION(:,:)::SPFAM1
    REAL,ALLOCATABLE,DIMENSION(:,:)::SPFAM2
    REAL,ALLOCATABLE,DIMENSION(:)::SSG
    REAL,ALLOCATABLE,DIMENSION(:,:)::SSLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::SSSIN
    REAL,ALLOCATABLE,DIMENSION(:)::SSSIN1
    REAL,ALLOCATABLE,DIMENSION(:)::SSSS
    REAL,ALLOCATABLE,DIMENSION(:)::STBX
    REAL,ALLOCATABLE,DIMENSION(:)::STBXO
    REAL,ALLOCATABLE,DIMENSION(:)::STBY
    REAL,ALLOCATABLE,DIMENSION(:)::STBYO
    REAL,ALLOCATABLE,DIMENSION(:)::STCAP
    REAL,ALLOCATABLE,DIMENSION(:)::STCUV
    REAL,ALLOCATABLE,DIMENSION(:,:)::STDOCB
    REAL,ALLOCATABLE,DIMENSION(:,:)::STDOCW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::STFPOCB
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::STFPOCW
    REAL,ALLOCATABLE,DIMENSION(:)::STLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::STPOCB
    REAL,ALLOCATABLE,DIMENSION(:,:)::STPOCW
    REAL,ALLOCATABLE,DIMENSION(:)::STRESSS
    REAL,ALLOCATABLE,DIMENSION(:,:)::STRSE
    REAL,ALLOCATABLE,DIMENSION(:,:)::STRSEM
    REAL,ALLOCATABLE,DIMENSION(:,:)::STRST
    REAL,ALLOCATABLE,DIMENSION(:)::SUB
    REAL,ALLOCATABLE,DIMENSION(:)::SUBO
    REAL,ALLOCATABLE,DIMENSION(:,:)::SURFDX
    REAL,ALLOCATABLE,DIMENSION(:,:)::SURFDY
    REAL,ALLOCATABLE,DIMENSION(:)::SVB
    REAL,ALLOCATABLE,DIMENSION(:)::SVBO
    REAL,ALLOCATABLE,DIMENSION(:)::SVPA
    REAL,ALLOCATABLE,DIMENSION(:)::SWB
    REAL,ALLOCATABLE,DIMENSION(:)::SWQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::SWQSUM
    REAL,ALLOCATABLE,DIMENSION(:)::TAASER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TACSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TAD
    REAL,ALLOCATABLE,DIMENSION(:,:)::TADFLUX
    REAL,ALLOCATABLE,DIMENSION(:)::TADFLUX2T
    REAL,ALLOCATABLE,DIMENSION(:)::TAGWSER
    REAL,ALLOCATABLE,DIMENSION(:)::TAPSER
    REAL,ALLOCATABLE,DIMENSION(:)::TAQSER
    REAL,ALLOCATABLE,DIMENSION(:)::TAQWRSR
    REAL,ALLOCATABLE,DIMENSION(:,:)::TASER
    REAL,ALLOCATABLE,DIMENSION(:)::TATMT
    REAL,ALLOCATABLE,DIMENSION(:)::TAUB
    REAL,ALLOCATABLE,DIMENSION(:)::TAUBSED
    REAL,ALLOCATABLE,DIMENSION(:)::TAUBSND
    REAL,ALLOCATABLE,DIMENSION(:,:)::TAUCRCOH
    REAL,ALLOCATABLE,DIMENSION(:)::TAUD
    REAL,ALLOCATABLE,DIMENSION(:)::TAUN
    REAL,ALLOCATABLE,DIMENSION(:)::TAUR
    REAL,ALLOCATABLE,DIMENSION(:,:)::TAURB
    REAL,ALLOCATABLE,DIMENSION(:)::TAURBA
    REAL,ALLOCATABLE,DIMENSION(:,:)::TAURS
    REAL,ALLOCATABLE,DIMENSION(:)::TAURSA
    REAL,ALLOCATABLE,DIMENSION(:)::TAVEGSER
    !REAL,ALLOCATABLE,DIMENSION(:,:)::TAWQCSR
    !      REAL,ALLOCATABLE,DIMENSION(:)::TAWQPSR
    REAL,ALLOCATABLE,DIMENSION(:)::TAWSER
    REAL,ALLOCATABLE,DIMENSION(:)::TBX
    REAL,ALLOCATABLE,DIMENSION(:)::TBX1
    REAL,ALLOCATABLE,DIMENSION(:)::TBY
    REAL,ALLOCATABLE,DIMENSION(:)::TBY1
    REAL,ALLOCATABLE,DIMENSION(:)::TCASER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TCCSER
    REAL,ALLOCATABLE,DIMENSION(:)::TCGWSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TCNBED
    REAL,ALLOCATABLE,DIMENSION(:)::TCNBEDA
    REAL,ALLOCATABLE,DIMENSION(:)::TCP
    REAL,ALLOCATABLE,DIMENSION(:)::TCPSER
    REAL,ALLOCATABLE,DIMENSION(:)::TCQSER
    REAL,ALLOCATABLE,DIMENSION(:)::TCQWRSR
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TCSER
    REAL,ALLOCATABLE,DIMENSION(:)::TCSHIELDS
    REAL,ALLOCATABLE,DIMENSION(:)::TCVEGSER
    !REAL,ALLOCATABLE,DIMENSION(:,:)::TCWQCSR
    REAL,ALLOCATABLE,DIMENSION(:)::TCWQPSR
    REAL,ALLOCATABLE,DIMENSION(:)::TCWSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TDRY
    REAL,ALLOCATABLE,DIMENSION(:,:)::TEM
    REAL,ALLOCATABLE,DIMENSION(:,:)::TEM1
    REAL,ALLOCATABLE,DIMENSION(:,:)::TEMAD
    REAL,ALLOCATABLE,DIMENSION(:)::TEMB
    REAL,ALLOCATABLE,DIMENSION(:)::TEMB1
    REAL,ALLOCATABLE,DIMENSION(:,:)::TEMINIT
    REAL,ALLOCATABLE,DIMENSION(:,:)::TEMLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::TEMSUM
    REAL,ALLOCATABLE,DIMENSION(:)::TEXP
    REAL,ALLOCATABLE,DIMENSION(:,:)::TGWSER
    REAL,ALLOCATABLE,DIMENSION(:)::THJET
    REAL,ALLOCATABLE,DIMENSION(:)::TIMVSFP
    REAL,ALLOCATABLE,DIMENSION(:)::TKTOXW
    REAL,ALLOCATABLE,DIMENSION(:)::TMP3D
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOX
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOX1
    REAL,ALLOCATABLE,DIMENSION(:)::TOX3DMAX
    REAL,ALLOCATABLE,DIMENSION(:)::TOX3DMIN
    REAL,ALLOCATABLE,DIMENSION(:)::TOXA
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXAD
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXB
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXB1
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXBA
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXBA1
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBBALN
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBBALO
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBEG2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBEG2TB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBEG2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXBINIT
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBLB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBLB2T
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXBLPF
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBMO2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBMO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXBMO2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXBS
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXCDFB
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXCDFW
    REAL,ALLOCATABLE,DIMENSION(:)::TOXEND2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXEND2TB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXEND2TW
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERE2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERE2TB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERE2TW
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERO2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERO2TB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERO2TW
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERR2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERR2TB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXERR2TW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXF
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXFB
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXFBA
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXFBL
    REAL,ALLOCATABLE,DIMENSION(:)::TOXFBL2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXFBLT
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXFDFB
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXFDFW
    REAL,ALLOCATABLE,DIMENSION(:)::TOXFLUXB2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXFLUXW2T
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXINIT
    REAL,ALLOCATABLE,DIMENSION(:)::TOXINTB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXINTW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXLPF
    REAL,ALLOCATABLE,DIMENSION(:)::TOXOUT2T
    REAL,ALLOCATABLE,DIMENSION(:)::TOXOUT2TB
    REAL,ALLOCATABLE,DIMENSION(:)::TOXOUT2TW
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXPARB
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXPARBC
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXPARW
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXPARWC
    REAL,ALLOCATABLE,DIMENSION(:,:,:,:)::TOXPFB
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXPFTB
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXPFTW
    REAL,ALLOCATABLE,DIMENSION(:,:,:,:)::TOXPFW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::TOXS
    REAL,ALLOCATABLE,DIMENSION(:,:)::TOXTMP
    REAL,ALLOCATABLE,DIMENSION(:)::TOXWBALN
    REAL,ALLOCATABLE,DIMENSION(:)::TOXWBALO
    REAL,ALLOCATABLE,DIMENSION(:,:)::TPSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TPWQMAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::TPWQMIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::TPWQSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::TQSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TQWRSER
    REAL,ALLOCATABLE,DIMENSION(:)::TRTOXB
    REAL,ALLOCATABLE,DIMENSION(:,:)::TSIWQSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::TSSMN
    REAL,ALLOCATABLE,DIMENSION(:,:)::TSSMX
    REAL,ALLOCATABLE,DIMENSION(:)::TSSRD
    REAL,ALLOCATABLE,DIMENSION(:,:)::TSSSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::TSSTOP
    REAL,ALLOCATABLE,DIMENSION(:,:)::TSSTRT
    REAL,ALLOCATABLE,DIMENSION(:)::TSX
    REAL,ALLOCATABLE,DIMENSION(:)::TSX1
    REAL,ALLOCATABLE,DIMENSION(:)::TSY
    REAL,ALLOCATABLE,DIMENSION(:)::TSY1
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR1E
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR1N
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR1S
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR1W
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR2C
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR2E
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR2N
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR2S
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVAR2W
    REAL,ALLOCATABLE,DIMENSION(:)::TVAR3C
    REAL,ALLOCATABLE,DIMENSION(:)::TVAR3E
    REAL,ALLOCATABLE,DIMENSION(:)::TVAR3N
    REAL,ALLOCATABLE,DIMENSION(:)::TVAR3S
    REAL,ALLOCATABLE,DIMENSION(:)::TVAR3W
    REAL,ALLOCATABLE,DIMENSION(:)::TWATER  !BRW to output to tecplot_algae
    REAL,ALLOCATABLE,DIMENSION(:,:)::TVEGSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TWET
    REAL,ALLOCATABLE,DIMENSION(:)::TWQ
    !REAL,ALLOCATABLE,DIMENSION(:,:,:)::TWQCSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TWQPSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::TWSER
    REAL,ALLOCATABLE,DIMENSION(:,:,:,:)::TXPFLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::U
    REAL,ALLOCATABLE,DIMENSION(:,:)::U0
    REAL,ALLOCATABLE,DIMENSION(:,:)::U1
    !REAL,ALLOCATABLE,DIMENSION(:,:)::U1ATV   ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:)::U1DT1
    REAL,ALLOCATABLE,DIMENSION(:)::U1V
    REAL,ALLOCATABLE,DIMENSION(:,:)::U2
    REAL,ALLOCATABLE,DIMENSION(:,:)::UAGD
    !REAL,ALLOCATABLE,DIMENSION(:,:)::UATV    ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::UCELLCTR
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::UCLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::UCOS
    REAL,ALLOCATABLE,DIMENSION(:)::UE0
    REAL,ALLOCATABLE,DIMENSION(:)::UE1DT1
    REAL,ALLOCATABLE,DIMENSION(:,:)::UECLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::UELPF
    REAL,ALLOCATABLE,DIMENSION(:)::UELSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::UESLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::UETLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::UHDY
    REAL,ALLOCATABLE,DIMENSION(:,:)::UHDY1
    REAL,ALLOCATABLE,DIMENSION(:,:)::UHDY1ATV
    REAL,ALLOCATABLE,DIMENSION(:)::UHDY1E
    REAL,ALLOCATABLE,DIMENSION(:,:)::UHDY2
    REAL,ALLOCATABLE,DIMENSION(:)::UHDY2E
    !REAL,ALLOCATABLE,DIMENSION(:,:)::UHDYATV   ! PMC - NOT USED
    REAL,ALLOCATABLE,DIMENSION(:)::UHDYE
    REAL,ALLOCATABLE,DIMENSION(:)::UHDYED
    REAL,ALLOCATABLE,DIMENSION(:,:)::UHDYWQ
    REAL,ALLOCATABLE,DIMENSION(:)::UHE
    REAL,ALLOCATABLE,DIMENSION(:)::UHEQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::UHLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::UIRT
    REAL,ALLOCATABLE,DIMENSION(:,:)::ULPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::ULSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::UMPLRPD
    REAL,ALLOCATABLE,DIMENSION(:,:)::UPLRPD
    REAL,ALLOCATABLE,DIMENSION(:)::USIN
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::USLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::USTAR
    REAL,ALLOCATABLE,DIMENSION(:)::USTARSED
    REAL,ALLOCATABLE,DIMENSION(:)::USTARSND
    REAL,ALLOCATABLE,DIMENSION(:,:)::UTLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::UTLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::UUU
    REAL,ALLOCATABLE,DIMENSION(:)::UV
    REAL,ALLOCATABLE,DIMENSION(:,:)::UVPT
    REAL,ALLOCATABLE,DIMENSION(:,:)::UWQ
    REAL,ALLOCATABLE,DIMENSION(:)::UWVMAG
    REAL,ALLOCATABLE,DIMENSION(:)::UWVSQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::V
    REAL,ALLOCATABLE,DIMENSION(:,:)::V0
    REAL,ALLOCATABLE,DIMENSION(:,:)::V1
    REAL,ALLOCATABLE,DIMENSION(:,:)::V1DT1
    REAL,ALLOCATABLE,DIMENSION(:)::V1U
    REAL,ALLOCATABLE,DIMENSION(:,:)::V2
    REAL,ALLOCATABLE,DIMENSION(:,:)::VAGD
    REAL,ALLOCATABLE,DIMENSION(:,:)::VATU
    REAL,ALLOCATABLE,DIMENSION(:)::VCELLCTR
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::VCLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::VCOS
    REAL,ALLOCATABLE,DIMENSION(:,:)::VDRBED
    REAL,ALLOCATABLE,DIMENSION(:,:)::VDRBED1
    REAL,ALLOCATABLE,DIMENSION(:,:)::VDRBED2
    REAL,ALLOCATABLE,DIMENSION(:)::VDRBEDA
    REAL,ALLOCATABLE,DIMENSION(:,:)::VDRBEDSED
    REAL,ALLOCATABLE,DIMENSION(:,:)::VDRBEDSND
    REAL,ALLOCATABLE,DIMENSION(:)::VDRDEPO
    REAL,ALLOCATABLE,DIMENSION(:)::VDRHBEDA1
    REAL,ALLOCATABLE,DIMENSION(:)::VDRRSPO
    REAL,ALLOCATABLE,DIMENSION(:)::VDWASTE
    REAL,ALLOCATABLE,DIMENSION(:)::VE0
    REAL,ALLOCATABLE,DIMENSION(:)::VE1DT1
    REAL,ALLOCATABLE,DIMENSION(:,:)::VECLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::VEGSERB
    REAL,ALLOCATABLE,DIMENSION(:)::VEGSERBT
    REAL,ALLOCATABLE,DIMENSION(:,:)::VEGSERH
    REAL,ALLOCATABLE,DIMENSION(:)::VEGSERHT
    REAL,ALLOCATABLE,DIMENSION(:,:)::VEGSERR
    REAL,ALLOCATABLE,DIMENSION(:)::VEGSERRT
    REAL,ALLOCATABLE,DIMENSION(:)::VELPF
    REAL,ALLOCATABLE,DIMENSION(:)::VELSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::VESLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::VETLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::VFRBED
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::VFRBED1
    REAL,ALLOCATABLE,DIMENSION(:,:)::VHDX
    REAL,ALLOCATABLE,DIMENSION(:,:)::VHDX1
    REAL,ALLOCATABLE,DIMENSION(:,:)::VHDX1ATU
    REAL,ALLOCATABLE,DIMENSION(:)::VHDX1E
    REAL,ALLOCATABLE,DIMENSION(:,:)::VHDX2
    REAL,ALLOCATABLE,DIMENSION(:)::VHDX2E
    REAL,ALLOCATABLE,DIMENSION(:,:)::VHDXATU
    REAL,ALLOCATABLE,DIMENSION(:)::VHDXE
    REAL,ALLOCATABLE,DIMENSION(:)::VHDXED
    REAL,ALLOCATABLE,DIMENSION(:,:)::VHDXWQ
    REAL,ALLOCATABLE,DIMENSION(:)::VHE
    REAL,ALLOCATABLE,DIMENSION(:,:)::VHLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::VIRT
    REAL,ALLOCATABLE,DIMENSION(:,:)::VLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::VLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::VMPLRPD
    REAL,ALLOCATABLE,DIMENSION(:,:)::VOLBW2
    REAL,ALLOCATABLE,DIMENSION(:,:)::VOLBW3
    REAL,ALLOCATABLE,DIMENSION(:)::VOLPERC
    REAL,ALLOCATABLE,DIMENSION(:)::VOLSEL
    REAL,ALLOCATABLE,DIMENSION(:)::VOLTOX
    REAL,ALLOCATABLE,DIMENSION(:)::VOLWQ
    REAL,ALLOCATABLE,DIMENSION(:)::VPA
    REAL,ALLOCATABLE,DIMENSION(:,:)::VPLRPD
    REAL,ALLOCATABLE,DIMENSION(:,:)::VPX
    REAL,ALLOCATABLE,DIMENSION(:,:)::VPY
    REAL,ALLOCATABLE,DIMENSION(:,:)::VPZ
    REAL,ALLOCATABLE,DIMENSION(:)::VSIN
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::VSLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::VTLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::VTLSHA
    REAL,ALLOCATABLE,DIMENSION(:)::VU
    REAL,ALLOCATABLE,DIMENSION(:,:)::VVLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::VVPT
    REAL,ALLOCATABLE,DIMENSION(:,:)::VVV
    REAL,ALLOCATABLE,DIMENSION(:,:)::VWQ
    REAL,ALLOCATABLE,DIMENSION(:)::VWVMAG
    REAL,ALLOCATABLE,DIMENSION(:)::VXXSUM
    REAL,ALLOCATABLE,DIMENSION(:)::VYYSUM
    REAL,ALLOCATABLE,DIMENSION(:,:)::W
    REAL,ALLOCATABLE,DIMENSION(:,:)::W1
    REAL,ALLOCATABLE,DIMENSION(:,:)::W2
    REAL,ALLOCATABLE,DIMENSION(:)::WACCWE
    REAL,ALLOCATABLE,DIMENSION(:,:)::WAGD
    REAL,ALLOCATABLE,DIMENSION(:)::WC
    REAL,ALLOCATABLE,DIMENSION(:)::WC2
    REAL,ALLOCATABLE,DIMENSION(:)::WCOREST
    REAL,ALLOCATABLE,DIMENSION(:)::WCORWST
    REAL,ALLOCATABLE,DIMENSION(:)::WCORNTH
    REAL,ALLOCATABLE,DIMENSION(:)::WCORSTH
    REAL,ALLOCATABLE,DIMENSION(:,:)::WINDD
    REAL,ALLOCATABLE,DIMENSION(:,:)::WINDS
    REAL,ALLOCATABLE,DIMENSION(:)::WINDST
    REAL,ALLOCATABLE,DIMENSION(:)::WINDSTKA
    REAL,ALLOCATABLE,DIMENSION(:)::WINDSTKA_SAVE
    REAL,ALLOCATABLE,DIMENSION(:,:)::WIRT
    REAL,ALLOCATABLE,DIMENSION(:)::WKQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::WLPF
    REAL,ALLOCATABLE,DIMENSION(:)::WLSHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::WMPLRPD
    REAL,ALLOCATABLE,DIMENSION(:)::WNDVELE
    REAL,ALLOCATABLE,DIMENSION(:)::WNDVELN
    REAL,ALLOCATABLE,DIMENSION(:,:)::WNDWHT
    REAL,ALLOCATABLE,DIMENSION(:,:)::WPERDX
    REAL,ALLOCATABLE,DIMENSION(:,:)::WPERDY
    REAL,ALLOCATABLE,DIMENSION(:,:)::WPLRPD
    REAL,ALLOCATABLE,DIMENSION(:)::WQAPC
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQATML
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQBCSET
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQBDSET
    REAL,ALLOCATABLE,DIMENSION(:)::WQBFCOD
    REAL,ALLOCATABLE,DIMENSION(:)::WQBFNH4
    REAL,ALLOCATABLE,DIMENSION(:)::WQBFNO3
    REAL,ALLOCATABLE,DIMENSION(:)::WQBFO2
    REAL,ALLOCATABLE,DIMENSION(:)::WQBFPO4D
    REAL,ALLOCATABLE,DIMENSION(:)::WQBFSAD
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQBGSET
    REAL,ALLOCATABLE,DIMENSION(:)::WQBMC
    REAL,ALLOCATABLE,DIMENSION(:)::WQBMD
    REAL,ALLOCATABLE,DIMENSION(:)::WQBMG
    REAL,ALLOCATABLE,DIMENSION(:)::WQBMM
    REAL,ALLOCATABLE,DIMENSION(:)::WQBMRC
    REAL,ALLOCATABLE,DIMENSION(:)::WQBMRD
    REAL,ALLOCATABLE,DIMENSION(:)::WQBMRG
    REAL,ALLOCATABLE,DIMENSION(:)::WQBMRM
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQCHL
    !REAL,ALLOCATABLE,DIMENSION(:,:,:,:)::WQCSER
    REAL,ALLOCATABLE,DIMENSION(:)::WQDENIT
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFBC
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFBD
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFBG
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFLC
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFLN
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFLP
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFRC
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFRN
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFRP
    REAL,ALLOCATABLE,DIMENSION(:)::WQDFSI
    REAL,ALLOCATABLE,DIMENSION(:)::WQDOPM
    REAL,ALLOCATABLE,DIMENSION(:)::WQDOS
    !      REAL,ALLOCATABLE,DIMENSION(:,:)::WQDSQ
    REAL,ALLOCATABLE,DIMENSION(:)::WQH10
    REAL,ALLOCATABLE,DIMENSION(:)::WQHT
    REAL,ALLOCATABLE,DIMENSION(:)::WQI0BOT
    REAL,ALLOCATABLE,DIMENSION(:)::WQKBP
    REAL,ALLOCATABLE,DIMENSION(:)::WQKCD
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQKCOD
    REAL,ALLOCATABLE,DIMENSION(:)::WQKDC
    REAL,ALLOCATABLE,DIMENSION(:)::WQKDCALM
    REAL,ALLOCATABLE,DIMENSION(:)::WQKDON
    REAL,ALLOCATABLE,DIMENSION(:)::WQKDOP
    REAL,ALLOCATABLE,DIMENSION(:)::WQKEB
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQKETMN
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQKETMX
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQKETOT
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQKETSUM
    REAL,ALLOCATABLE,DIMENSION(:)::WQKHCOD
    REAL,ALLOCATABLE,DIMENSION(:)::WQKHR
    REAL,ALLOCATABLE,DIMENSION(:)::WQKHRM
    REAL,ALLOCATABLE,DIMENSION(:)::WQKK
    REAL,ALLOCATABLE,DIMENSION(:)::WQKLPC
    REAL,ALLOCATABLE,DIMENSION(:)::WQKLPN
    REAL,ALLOCATABLE,DIMENSION(:)::WQKLPP
    REAL,ALLOCATABLE,DIMENSION(:)::WQKMV
    REAL,ALLOCATABLE,DIMENSION(:)::WQKMVA
    REAL,ALLOCATABLE,DIMENSION(:)::WQKMVB
    REAL,ALLOCATABLE,DIMENSION(:)::WQKMVC
    REAL,ALLOCATABLE,DIMENSION(:)::WQKMVD
    REAL,ALLOCATABLE,DIMENSION(:)::WQKMVE
    REAL,ALLOCATABLE,DIMENSION(:)::WQKMVMIN
    REAL,ALLOCATABLE,DIMENSION(:)::WQKRDOS
    REAL,ALLOCATABLE,DIMENSION(:)::WQKRO
    REAL,ALLOCATABLE,DIMENSION(:)::WQKRPC
    REAL,ALLOCATABLE,DIMENSION(:)::WQKRPN
    REAL,ALLOCATABLE,DIMENSION(:)::WQKRPP
    REAL,ALLOCATABLE,DIMENSION(:)::WQKSUA
    REAL,ALLOCATABLE,DIMENSION(:)::WQKTR
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQLPSET
    REAL,ALLOCATABLE,DIMENSION(:)::WQN17
    REAL,ALLOCATABLE,DIMENSION(:)::WQNIT
    REAL,ALLOCATABLE,DIMENSION(:)::WQO18
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQOBCE
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQOBCN
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQOBCS
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQOBCW
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQOBCE_GL
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQOBCN_GL
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQOBCS_GL
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQOBCW_GL
    REAL,ALLOCATABLE,DIMENSION(:)::WQOBTOT
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQO   ! *** DSLLC
    REAL,ALLOCATABLE,DIMENSION(:)::WQP19
    REAL,ALLOCATABLE,DIMENSION(:)::WQPC
    REAL,ALLOCATABLE,DIMENSION(:)::WQPD
    REAL,ALLOCATABLE,DIMENSION(:)::WQPG
    REAL,ALLOCATABLE,DIMENSION(:)::WQPM
    REAL,ALLOCATABLE,DIMENSION(:)::WQPMC
    REAL,ALLOCATABLE,DIMENSION(:)::WQPMD
    REAL,ALLOCATABLE,DIMENSION(:)::WQPMG
    REAL,ALLOCATABLE,DIMENSION(:)::WQPMM
    REAL,ALLOCATABLE,DIMENSION(:)::WQPNC
    REAL,ALLOCATABLE,DIMENSION(:)::WQPND
    REAL,ALLOCATABLE,DIMENSION(:)::WQPNG
    REAL,ALLOCATABLE,DIMENSION(:)::WQPNM
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQPO4D
    REAL,ALLOCATABLE,DIMENSION(:)::WQPRC
    REAL,ALLOCATABLE,DIMENSION(:)::WQPRD
    REAL,ALLOCATABLE,DIMENSION(:)::WQPRG
    REAL,ALLOCATABLE,DIMENSION(:)::WQPRM
    REAL,ALLOCATABLE,DIMENSION(:)::WQPRRC
    REAL,ALLOCATABLE,DIMENSION(:)::WQPRRD
    REAL,ALLOCATABLE,DIMENSION(:)::WQPRRG
    REAL,ALLOCATABLE,DIMENSION(:)::WQPRRM
    REAL,ALLOCATABLE,DIMENSION(:)::WQPSQ
    !      REAL,ALLOCATABLE,DIMENSION(:)::WQPSQC  NOT USED
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQPSSER
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQPSSRT
    REAL,ALLOCATABLE,DIMENSION(:)::WQR20
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQRPSET
    REAL,ALLOCATABLE,DIMENSION(:)::WQRR
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQSAD
    REAL,ALLOCATABLE,DIMENSION(:)::WQSDCOEF
    REAL,ALLOCATABLE,DIMENSION(:)::WQT10
    REAL,ALLOCATABLE,DIMENSION(:)::WQT17
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQTAMP
    REAL,ALLOCATABLE,DIMENSION(:)::WQTD1FCB
    REAL,ALLOCATABLE,DIMENSION(:)::WQTD2FCB
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDGC
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDGD
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDGG
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDGM
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDGP
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDHDR
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQTDKR
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDMNL
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDNIT
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDRC
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDRD
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDRG
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDRM
    REAL,ALLOCATABLE,DIMENSION(:)::WQTDTAM
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQTEMMAX
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQTEMMIN
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQTEMSUM
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQV
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQVMAX
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQVMIN
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQVO
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQVSUM
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQWDSL
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WQWPSL
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQWPSLC
    REAL,ALLOCATABLE,DIMENSION(:)::WQWSC
    REAL,ALLOCATABLE,DIMENSION(:)::WQWSD
    REAL,ALLOCATABLE,DIMENSION(:)::WQWSG
    REAL,ALLOCATABLE,DIMENSION(:)::WQWSLP
    REAL,ALLOCATABLE,DIMENSION(:)::WQWSRP
    REAL,ALLOCATABLE,DIMENSION(:)::WQWSS
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQWSSET
    REAL,ALLOCATABLE,DIMENSION(:,:)::WRSPB
    REAL,ALLOCATABLE,DIMENSION(:)::WRSPBA
    REAL,ALLOCATABLE,DIMENSION(:)::WRSPO
    REAL,ALLOCATABLE,DIMENSION(:,:)::WRSPS
    REAL,ALLOCATABLE,DIMENSION(:)::WRSPSA
    REAL,ALLOCATABLE,DIMENSION(:)::WS
    REAL,ALLOCATABLE,DIMENSION(:)::WS2
    REAL,ALLOCATABLE,DIMENSION(:)::WSEDO
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::WSETA
    REAL,ALLOCATABLE,DIMENSION(:,:)::WTCI
    REAL,ALLOCATABLE,DIMENSION(:,:)::WTLPF
    REAL,ALLOCATABLE,DIMENSION(:,:)::WVDISP
    REAL,ALLOCATABLE,DIMENSION(:)::WVDTKEM
    REAL,ALLOCATABLE,DIMENSION(:)::WVDTKEP
    REAL,ALLOCATABLE,DIMENSION(:)::WVENEP
    REAL,ALLOCATABLE,DIMENSION(:)::WVFRQL
    REAL,ALLOCATABLE,DIMENSION(:,:)::WVHUU
    REAL,ALLOCATABLE,DIMENSION(:,:)::WVHUV
    REAL,ALLOCATABLE,DIMENSION(:,:)::WVHVV
    REAL,ALLOCATABLE,DIMENSION(:)::WVKHC
    REAL,ALLOCATABLE,DIMENSION(:)::WVKHP
    REAL,ALLOCATABLE,DIMENSION(:)::WVKHU
    REAL,ALLOCATABLE,DIMENSION(:)::WVKHV
    REAL,ALLOCATABLE,DIMENSION(:,:)::WVPP
    REAL,ALLOCATABLE,DIMENSION(:,:)::WVPT
    REAL,ALLOCATABLE,DIMENSION(:,:)::WVPU
    REAL,ALLOCATABLE,DIMENSION(:,:)::WVPV
    REAL,ALLOCATABLE,DIMENSION(:)::WVTMP1
    REAL,ALLOCATABLE,DIMENSION(:)::WVTMP2
    REAL,ALLOCATABLE,DIMENSION(:)::WVTMP3
    REAL,ALLOCATABLE,DIMENSION(:)::WVTMP4
    REAL,ALLOCATABLE,DIMENSION(:)::WVWHA
    REAL,ALLOCATABLE,DIMENSION(:,:)::WWQ
    REAL,ALLOCATABLE,DIMENSION(:,:)::WWW
    REAL,ALLOCATABLE,DIMENSION(:,:)::WZ
    REAL,ALLOCATABLE,DIMENSION(:,:)::WZ1
    REAL,ALLOCATABLE,DIMENSION(:)::XBENMUD
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOALL
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOCOD
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDODEF
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDODOC
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDODZ
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOKAR
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDONIT
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOOUT
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOPPB
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOPPM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOPSL
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDORRB
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDORRM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOSAT
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOSOD
    REAL,ALLOCATABLE,DIMENSION(:,:)::XDOTRN
    REAL,ALLOCATABLE,DIMENSION(:)::XJETL
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMCO2C
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMCO2D
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMCO2G
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMCO2M
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMDM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMIC
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMID
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMIG
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMIM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMNC
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMND
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMNG
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMNM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMPC
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMPD
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMPG
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMPM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMTC
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMTD
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMTG
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMTM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XLIMVM
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::XLRPD
    REAL,ALLOCATABLE,DIMENSION(:,:)::XMACSUM
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::XMLRPD
    REAL,ALLOCATABLE,DIMENSION(:)::XSMO20
    REAL,ALLOCATABLE,DIMENSION(:)::YJETL
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::YLRPD
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::YMLRPD
    REAL,ALLOCATABLE,DIMENSION(:)::Z
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZAD
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZBEDC
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZBEDG
    REAL,ALLOCATABLE,DIMENSION(:)::ZBEDGT
    REAL,ALLOCATABLE,DIMENSION(:)::ZBR
    REAL,ALLOCATABLE,DIMENSION(:)::ZBRE
    REAL,ALLOCATABLE,DIMENSION(:)::ZBRSED
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZELBED
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZELBED1
    REAL,ALLOCATABLE,DIMENSION(:)::ZELBEDA
    REAL,ALLOCATABLE,DIMENSION(:)::ZELBEDA1
    REAL,ALLOCATABLE,DIMENSION(:)::ZEQ
    REAL,ALLOCATABLE,DIMENSION(:)::ZEQD
    REAL,ALLOCATABLE,DIMENSION(:)::ZEQDI
    REAL,ALLOCATABLE,DIMENSION(:)::ZEQI
    REAL,ALLOCATABLE,DIMENSION(:)::ZETATOP
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::ZILRPD
    REAL,ALLOCATABLE,DIMENSION(:)::ZJET
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::ZLRPD
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::ZMLRPD
    REAL,ALLOCATABLE,DIMENSION(:)::ZP
    REAL,ALLOCATABLE,DIMENSION(:)::ZZ
    REAL,ALLOCATABLE,DIMENSION(:)::ZZP
    ! *******************************************************************************************
    ! *** LAGRANGIAN TRAJECTORIES OF DRIFTERS
    INTEGER(4),PARAMETER  ::RKD=8                  !REAL KIND
    INTEGER(4),PARAMETER  ::ULOC=201               !OPEN UNIT FOR LAGRA.INP
    INTEGER(4),PARAMETER  ::ULGR=202               !OPEN UNIT FOR LAGRA.OUT
    INTEGER(4),PARAMETER  ::UCOR=203               !OPEN UNIT FOR CORNRES.INP
    REAL(RKD) ,ALLOCATABLE::XLA(:)                 !XLA(NPD) DRIFTER COORDINATES
    REAL(RKD) ,ALLOCATABLE::YLA(:)                 !YLA(NPD)
    REAL(RKD) ,ALLOCATABLE::ZLA(:)                 !ZLA(NPD)
    INTEGER(RKD) ,ALLOCATABLE::ILA_ALL(:)             !XLA(NPD_TOT) DRIFTER COORDINATES
    INTEGER(RKD) ,ALLOCATABLE::JLA_ALL(:)             !XLA(NPD_TOT) DRIFTER COORDINATES

    REAL(RKD) ,ALLOCATABLE::XLA_ALL(:)             !XLA(NPD_TOT) DRIFTER COORDINATES
    REAL(RKD) ,ALLOCATABLE::YLA_ALL(:)             !YLA(NPD_TOT)
    REAL(RKD) ,ALLOCATABLE::ZLA_ALL(:)             !ZLA(NPD_TOT)
    INTEGER ,ALLOCATABLE::NPD_TAG_GLO(:)         !NPD_TAG_GLO(NPD_TOT) \ WE NEED TO TAG DRIFTERS WITH ID
    INTEGER ,ALLOCATABLE::NPD_TAG_GLO_SORT(:)         !NPD_TAG_GLO_SORT(NPD_TOT) \ WE NEED TO TAG DRIFTERS WITH ID
    INTEGER ,ALLOCATABLE::NPD_TAG_LOC(:)         !NPD_TAG_LOC(NPD)     / TO ENSURE FILE WRITE CONSISTENCY
    REAL(RKD) ,ALLOCATABLE::VELB(:)                !VELB(1:KC+1) VETICAL DISTRIBUTION FOR U,V,W

    REAL(RKD) ,ALLOCATABLE::DLA(:)                 !DLA(NPD) INITIAL DEPTH OF DRIFTER
    REAL(RKD) ,ALLOCATABLE::DLA_ALL(:)                 !DLA(NPD) INITIAL DEPTH OF DRIFTER
    REAL(RKD),ALLOCATABLE ::XCOR(:,:)              !XCOR(L,1:4) X POLYGON VERTICES, X(L,5): CENTROID X
    REAL(RKD),ALLOCATABLE ::YCOR(:,:)              !YCOR(L,1:4) Y POLYGON VERTICES, Y(L,5): CENTROID Y
    REAL(RKD),ALLOCATABLE ::AREA(:)                !AREA OF POLYGON LIJ
    REAL(RKD),ALLOCATABLE ::HPLA(:)                !TOTAL WATER DEPTH OF DRIFTERS
    REAL(RKD),ALLOCATABLE ::BELVLA(:)              !BOTTOM ELEVATION OF DRIFTERS

    INTEGER(4),ALLOCATABLE::LLA(:)                 !LIJ(NP) INDEX OF POLYGON
    INTEGER(4),ALLOCATABLE::KLA(:)                 !K OF DRIFTER NP
    INTEGER(4)            ::LA_ZCAL                !OPTION TO CALCULATE Z
    INTEGER(4)            ::LA_PRAN                !OPTION TO ADD A RANDOM MOVEMENT
    INTEGER(4)            ::LA_DIFOP               !OPTION FOR DIFFUSION COEFFICIENT
    INTEGER(4)            ::MPI_DRIFT_INIT         !FLAG TO INVOKE MPI DRIFTER COMM INITIALIZATION
    INTEGER(4),ALLOCATABLE::PROC_SIZE_ARR(:)       !SIZE OF ARRAY ON EACH PROC FOR DRIFTER GATHER
    INTEGER(4)            ::INT_GHOST
    INTEGER(4)            ::GHOST_ZONE_CHECK

    REAL(RKD)             ::LA_BEGTI               !TIME BEGINNING FOR LAGRA
    REAL(RKD)             ::LA_ENDTI               !TIME ENDING FOR LAGRA
    REAL(RKD)             ::LA_FREQ                !LA_FREQ IN HOURS FOR LAGRA OUTPUT
    REAL(RKD)             ::LA_HORDIF              !HORIZONTAL DIFFUSION
    REAL(RKD)             ::LA_VERDIF              !VERTICAL DIFFUSION
    REAL(RKD)             ::DEPOP                  !OPTION FOR READING DEPTH  COLMUN IN DRIFTER.INP
    ! ISWAVE = 3
    REAL(RKD)             ::KSW                    !NIKURADSE ROUGHNESS (APPROXIMATE 2.5*D50)
    REAL                  ::TIMENEXT_WRITE_DR      ! OUTPUT TIME TO WRITE DRIFTER INFO TO FILE (NEEDS TO BE GLOBAL)


    ! PT- All real values are explicitly specified as DOUBLE PRECISION for accuracy. 7/16/08
    !
    INTEGER::IMORPH_SEDZLJ
    INTEGER::ISEDTIME
    INTEGER::ISSLOPE
    INTEGER::ISWNWAVE
    INTEGER::ITBM
    INTEGER::KZ
    INTEGER::NACTLAY
    INTEGER::NCALC_BL
    INTEGER::NEQUIL
    INTEGER::NSEDFLUME
    INTEGER::NSICM
    INTEGER::NSC
    INTEGER::NVAR_BED
    INTEGER::NWVCOUNT
    INTEGER::NWAVUP
    INTEGER::STWVNUM
    INTEGER::STWVTIM
    INTEGER::STINC
    DOUBLE PRECISION::MAXDEPLIMIT !the maximum limit of mass from 1st layer deposited on active bed layer.
    DOUBLE PRECISION::NSCTOT
    DOUBLE PRECISION::RHO         !EFDC variable in units of MKS 1000. kg/m^3
    DOUBLE PRECISION::SEDDENS     !add new parameter for sediment density rho_s
    DOUBLE PRECISION::TACTM       !non-dimensional active layer thickness multiplier
    DOUBLE PRECISION::TAUCONST
    DOUBLE PRECISION::WATERDENS   !add new parameter for water density rho_w
    DOUBLE PRECISION::ZBSKIN

    INTEGER,ALLOCATABLE,DIMENSION(:,:)::BLFLAG      !(LCM,NSCM)
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::LAYER    !(KB,LCM)
    INTEGER,ALLOCATABLE,DIMENSION(:)::NSCD       !(2)
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::NCORENO  !(IGM,JGM)
    INTEGER,ALLOCATABLE,DIMENSION(:)::SLLN          !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::ALPHA_PX      !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::ALPHA_PY      !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::ALPHA_RX    !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::ALPHA_RY    !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::BED_SED_FLX !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::BED_TOX_FLX !(LCM,NTXM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::BLVEL       !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::BULKDENS    !(KB,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::CAVG        !(LCM,KCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::CAVGT         !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::CAVGS       !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::CBLTOT        !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:)::CBL       !(2,LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::CTB         !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::CONAVG      !(LCM,KCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::CONTTOT       !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:)::CSEDF     !(LCM,KCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::CSEDVR      !(10,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::CTEMP       !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::CTOTP         !(LCM),THICKTEMP
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:)::CTOX      !(LCM,KCM,NSCM) !NTXM?
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::D50           !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::D50AVG        !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::D           !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::DBL         !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::DBULK         !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::DEP           !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::DEPO          !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::DIFFCOFF      !(NTXM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::DISTAR        !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::DPCB        !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::DWS           !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::DZBL        !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::DZBL_LAST   !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::E           !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:)::ERATETEMP    !(INCORE,KB,ITBM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::EBD         !(KB,LCM)ELAY(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::EBL           !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::ECON          !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::ELAY          !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::EPCB        !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::ERATEND      !(NSICM,ITBM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:)::ERATE     !(KB,LCM,ITBM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::ERATEMOD      !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::ESUS          !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::ETOTO         !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::FC            !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::FWW           !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::FWDIR       !(LCM,8)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::FWVHT         !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::FWVTP         !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:)::HEIGHT	   !(ICM,JCM,KC)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::HF            !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::HT            !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::KN            !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::KPART         !(NTXM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::KRATE         !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::PCBDISS     !(LCM,KCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::PCBDEP        !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::PCBDH         !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::PCBFRAC     !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::PCBH          !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:)::PCONT     !(NSCM,KB,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::PCONTEMP    !(NSCM,KB)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:)::PER       !(NSCM,KB,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::POTDIFF       !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::PROBG       !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::PROBL       !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::PROBVR      !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::PSUS        !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::QBSED       !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::SCD           !(2)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::SCND          !(NSICM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::SH_SCALE      !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::SSGI          !(NSCM) DSEDGMM array
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::STWVHT        !(LCM,100)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::STWVTP        !(LCM,100)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::STWVDR        !(LCM,100)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TACT          !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TAU           !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::TAUCOR      !(KB,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TAUCRIT       !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TAUCRITE      !(NSICM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TAUCRITSF     !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TCRE          !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TAUDD         !(2)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TAULOC        !(ITBM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TCRSUS        !(NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::THCK          !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TOXAVGT	   !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::TRANS       !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::TSED        !(KB,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::TSED0       !(KB,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TSED0S        !(INCORE)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TSEDT         !(LCM),TOXFTMP,TOXXTMP
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::TSET0T        !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::TTEMP       !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::TTEMPCONT   !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::UBL         !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::UBLE        !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::UBLN        !(NSCM,LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::UVEL  	   !(LCM,KC)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::USW         !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::VBL         !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::VVEL        !(LCM,KC)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::VZDIF         !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::WVANG         !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::WVFREQ        !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:)::WVORBIT       !(LCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::XBLFLUX     !(LCM,NSCM)
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:)::YBLFLUX     !(LCM,NSCM)
    ! End SEDZLJ variables

    !Begining of ensight output variables
    INTEGER::ENSIGHT1, ENSIGHT2, ENSIGHT3, ENSIGHT4, ENSIGHT5, ENSIGHT6, ENSIGHT7
    INTEGER::ENSIGHT8, ENSIGHT9, ENSIGHT10,ENSIGHT11,ENSIGHT12,ENSIGHT13,ENSIGHT14
    INTEGER::ENSIGHT15,ENSIGHT16,ENSIGHT17,ENSIGHT18,ENSIGHT19,ENSIGHT20,ENSIGHT21
    INTEGER::ENSIGHT22,ENSIGHT23,ENSIGHT24,ENSIGHT25,ENSIGHT26,ENSIGHT27,ENSIGHT28
    INTEGER::ENSIGHT29,ENSIGHT30,ENSIGHT31
    !Ending of ensight output variables

    ! Begin Dissolved CO2 variables
    REAL,ALLOCATABLE,DIMENSION(:)::CDOSATIDX
    REAL,ALLOCATABLE,DIMENSION(:)::WQCDOS
    REAL,ALLOCATABLE,DIMENSION(:,:)::WQITOP
    REAL,ALLOCATABLE,DIMENSION(:)::WQKRCDOS
    REAL,ALLOCATABLE,DIMENSION(:)::WQP22
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDOALL
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDODEF
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDODOC
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDODZ
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDOKAR
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDOPPB
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDOPPM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDOPSL
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDORRB
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDORRM
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDOSAT
    REAL,ALLOCATABLE,DIMENSION(:,:)::XCDOTRN
          ! End Dissolved CO2 variables
          ! Begin MHK variables
    LOGICAL::LMHK
    INTEGER::MHKTYP !number of different types of MHK devices
    INTEGER::TCOUNT !number of cells with MHK devices
    INTEGER::UPSTREAM !flag to decide if upstream or cell velocities are used
    REAL::BETAMHK_P,BETAMHK_D,CE4MHK,PB_COEF !adjustable parameters that affect wake structure through K-e terms
    INTEGER::OUTPUTFLAG !this tells the Tecplot routine what to output
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IJLTURB !(TCOUNT,3) # of cells with turbines:1=I-loc, 2=J-loc, 3=L-loc
    REAL,ALLOCATABLE,DIMENSION(:)::BOFFMHK,BOFFSUP,TOFFMHK,TOFFSUP !bottom and top of MHK turbines and support structures
    REAL,ALLOCATABLE,DIMENSION(:)::CDSUP ! (MHKTYPE)
    REAL,ALLOCATABLE,DIMENSION(:)::CTMHK ! (MHKTYPE) # of turbine types
    REAL,ALLOCATABLE,DIMENSION(:)::DENMHK !density of MHK devices (#/cell) (MHKTYPE)
    REAL,ALLOCATABLE,DIMENSION(:,:)::ESUP ! energy dissipated from MHK support (LCM,TCOUNT)
    REAL,ALLOCATABLE,DIMENSION(:,:)::EMHK ! energy dissipated from MHK device (LCM,TCOUNT)
    REAL,ALLOCATABLE,DIMENSION(:,:)::FXMHK ! (LCM,KCM)
    REAL,ALLOCATABLE,DIMENSION(:)::FXMHKE ! (LCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::FXSUP ! (LCM,KCM)
    REAL,ALLOCATABLE,DIMENSION(:)::FXSUPE ! (LCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::FYMHK ! (LCM,KCM)
    REAL,ALLOCATABLE,DIMENSION(:)::FYMHKE ! (LCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::FYSUP ! (LCM,KCM)
    REAL,ALLOCATABLE,DIMENSION(:)::FYSUPE ! (LCM)
    REAL,ALLOCATABLE,DIMENSION(:)::HEIGHTMHK ! (LCM)
    REAL,ALLOCATABLE,DIMENSION(:)::HEIGHTSUP ! (LCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::PMHK ! array that accumulates MHK power (LCM,KCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSUP ! array that accumulates vegetative power (LCM,KCM)
    REAL,ALLOCATABLE,DIMENSION(:)::REFELEV ! reference elevation for Free Flow Power (LCM)
    REAL,ALLOCATABLE,DIMENSION(:)::VMAXCUT ! (MHKTYPE)
    REAL,ALLOCATABLE,DIMENSION(:)::VMINCUT ! (MHKTYPE)
    REAL,ALLOCATABLE,DIMENSION(:)::WIDTHMHK ! (MHKTYPE)
    REAL,ALLOCATABLE,DIMENSION(:)::WIDTHSUP ! (MHKTYPE)
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZMAXMHK ! (MHKTYPE,LCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZMAXSUP ! (MHKTYPE,LCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZMINMHK ! (MHKTYPE,LCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::ZMINSUP ! (MHKTYPE,LCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::FXTEMP ! (LCM,KCM)
    REAL,ALLOCATABLE,DIMENSION(:,:)::FYTEMP ! (LCM,KCM)
    ! End MHK variables

    ! Begin MPI parallel variables
    INTEGER MPI_PAR_FLAG
    INTEGER(4) EFDC_COMM
    INTEGER GNX
    INTEGER GNY
    INTEGER LC_GLOBAL
    INTEGER IC_GLOBAL
    INTEGER JC_GLOBAL
    INTEGER LCGLOB
    INTEGER(4) MY_TASK
    INTEGER(4) MASTER_TASK
    INTEGER(4) NPARTX
    INTEGER(4) NPARTY
    INTEGER(ip) NGHOST
    INTEGER(ip) NPARTS
    INTEGER(ip) PNX
    INTEGER(ip) PNY
    INTEGER(4) PARTID
    INTEGER(4) NODEID
    INTEGER(4) PARTID2
    INTEGER(4) PART_NORTH
    INTEGER(4) PART_WEST
    INTEGER(4) PART_EAST
    INTEGER(4) PART_SOUTH
    INTEGER(ip) XID
    INTEGER(ip) YID
    DOUBLE PRECISION STARTTIME,ENDTIME,EFDCRUNTIME
#ifdef key_mpi
    CHARACTER(len=3),ALLOCATABLE,DIMENSION (:):: ANS
#else
    CHARACTER(len=0),ALLOCATABLE,DIMENSION (:):: ANS
#endif
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::TILEID
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::TILE2NODE
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::IC_LORP
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JC_LORP

    INTEGER(ip),ALLOCATABLE,DIMENSION (:,:)::IJCT_GLOBAL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:,:)::IJCTLT_GLOBAL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::XPAR
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::YPAR
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::XLOC
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::YLOC


    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::IPBS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::IPBW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::IPBE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::IPBN_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JPBS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JPBW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JPBE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JPBN_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::LPBS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::LPBW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::LPBE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::LPBN_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::ISPBS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::ISPBW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::ISPBE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::ISPBN_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NPSERS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NPSERW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NPSERE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NPSERN_GL
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCBE_GL
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCBN_GL
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCBS_GL
    REAL,ALLOCATABLE,DIMENSION(:,:)::PCBW_GL
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSBE_GL
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSBN_GL
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSBS_GL
    REAL,ALLOCATABLE,DIMENSION(:,:)::PSBW_GL

    !River global data arrays
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::IQS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JQS_GL
    REAL(wp),ALLOCATABLE,DIMENSION (:)::QSSE_GL
    REAL(wp),ALLOCATABLE,DIMENSION (:)::QSSE
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NQSMUL_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NQSMF_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NQSERQ_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:,:)::NCSERQ_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NTOXSRQ_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NSEDSRQ_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NSNDSRQ_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NTOXSRQ
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NSEDSRQ
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NSNDSRQ
    REAL(wp),ALLOCATABLE,DIMENSION (:)::QFACTOR_GL
    REAL(wp),ALLOCATABLE,DIMENSION (:,:)::CQSE_GL
    !Concentration global data arrays
    Integer(ip),ALLOCATABLE,DIMENSION (:)::ICBS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JCBS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NTSCRS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:,:)::NCSERS_GL
    REAL(wp),ALLOCATABLE,DIMENSION (:,:,:)::CBS_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::ICBW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JCBW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NTSCRW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:,:)::NCSERW_GL
    REAL(wp),ALLOCATABLE,DIMENSION (:,:,:)::CBW_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::ICBE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JCBE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NTSCRE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:,:)::NCSERE_GL
    REAL(wp),ALLOCATABLE,DIMENSION (:,:,:)::CBE_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::ICBN_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::JCBN_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:)::NTSCRN_GL
    INTEGER(ip),ALLOCATABLE,DIMENSION (:,:)::NCSERN_GL
    REAL(wp),ALLOCATABLE,DIMENSION (:,:,:)::CBN_GL
    INTEGER MLTMSR_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::ILTMSR_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::JLTMSR_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::NTSSSS_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MTMSRP_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MTMSRC_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MTMSRA_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MTMSRUE_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MTMSRUT_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MTMSRU_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MTMSRQE_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MTMSRQ_GL
    INTEGER,ALLOCATABLE,DIMENSION (:)::MLTM_GL
    CHARACTER(len=20),ALLOCATABLE,DIMENSION (:):: CLTMSR_GL

    INTEGER,ALLOCATABLE,DIMENSION(:)::LEAST
    INTEGER,ALLOCATABLE,DIMENSION(:)::LWEST
    INTEGER,ALLOCATABLE,DIMENSION (:)::L_CONG
    INTEGER::CONGDOM

    REAL(wp),ALLOCATABLE,DIMENSION (:,:)::DUM_COM1
    REAL(wp),ALLOCATABLE,DIMENSION (:,:)::DUM_COM2

    REAL(4) TTMP
    REAL(4) T1TMP
    REAL(4) SECNDS_ZERO

    ! OMP VARIABLE
    INTEGER TID
    INTEGER NTHREADS
    INTEGER CHUNKSIZE

    ! Frank runoff model variable
    REAL(wp),ALLOCATABLE,DIMENSION (:,:)::strm_temp
    INTEGER NCSERM2
    LOGICAL FLIU
    REAL BASE
    REAL PERT_MIN
    REAL PERT_MAX
    ! declare variable related to aquaculture installation
    INTEGER LAQUA
    INTEGER KAQUA
    INTEGER AQUAINCL
    INTEGER AQUATURB
    REAL HAQUA
    REAL AQUADIAM
    REAL AQUADEN
    REAL BETADRP_P
    REAL BETADRP_D
    REAL CE4DRP
    REAL::AQUADRAG
    REAL,ALLOCATABLE,DIMENSION(:,:) ::DRPRDRG
    REAL,ALLOCATABLE,DIMENSION(:,:) ::DRPRTURB
    REAL,ALLOCATABLE,DIMENSION(:,:):: FXDRPR
    REAL,ALLOCATABLE,DIMENSION(:,:):: FYDRPR
    REAL,ALLOCATABLE,DIMENSION(:):: FXDRPRE
    REAL,ALLOCATABLE,DIMENSION(:):: FYDRPRE

    ! Declare global variables for coupling with Deep Thunder
    !
    INTEGER,ALLOCATABLE,DIMENSION(:):: SRC_ADDRESS,DST_ADDRESS
    DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:):: REMAP_MATRIX
    INTEGER DST_SIZE
    INTEGER(KIND=4) NUMLINKS
    REAL TDIFF_DT  ! Used to compute weighting values for linear interpolation
    REAL(KIND=dprec):: TIMEDT_M1,TIMEDT_M2
    REAL,ALLOCATABLE,DIMENSION(:)::TATMT_M1    ! For linear interpolation
    REAL,ALLOCATABLE,DIMENSION(:)::TATMT_M2    ! every timestep need two values
    REAL,ALLOCATABLE,DIMENSION(:)::WNDVELE_M1  ! 10m wind speed East
    REAL,ALLOCATABLE,DIMENSION(:)::WNDVELE_M2  !
    REAL,ALLOCATABLE,DIMENSION(:)::WNDVELN_M1  ! 10m wind speed North
    REAL,ALLOCATABLE,DIMENSION(:)::WNDVELN_M2  !
    REAL,ALLOCATABLE,DIMENSION(:)::PATMT_M1    ! SFC pressure
    REAL,ALLOCATABLE,DIMENSION(:)::PATMT_M2    !
    REAL,ALLOCATABLE,DIMENSION(:)::RAINT_M1    ! 10 min accumulated precip
    REAL,ALLOCATABLE,DIMENSION(:)::RAINT_M2    !
    REAL,ALLOCATABLE,DIMENSION(:)::EVAPT_M1    ! 10 min accum evap
    REAL,ALLOCATABLE,DIMENSION(:)::EVAPT_M2    !
    REAL,ALLOCATABLE,DIMENSION(:)::RHA_M1      ! 2m Rel Hum
    REAL,ALLOCATABLE,DIMENSION(:)::RHA_M2      !
    REAL,ALLOCATABLE,DIMENSION(:)::SOLSWRT_M1  ! Downward shortwave rad flux
    REAL,ALLOCATABLE,DIMENSION(:)::SOLSWRT_M2  !
    REAL,ALLOCATABLE,DIMENSION(:)::LWDNB_M1    ! Downwell Longwave flux
    REAL,ALLOCATABLE,DIMENSION(:)::LWDNB_M2    !
    REAL,ALLOCATABLE,DIMENSION(:)::LWUPB_M1    ! Upwell longwave flux
    REAL,ALLOCATABLE,DIMENSION(:)::LWUPB_M2    !
    REAL,ALLOCATABLE,DIMENSION(:)::LWDNB       ! Time averaged long
    REAL,ALLOCATABLE,DIMENSION(:)::LWUPB       !  wave fluxes
    INTEGER(KIND=4) DTGRID_NT  ! time dimension DeepThunder grid
    INTEGER(KIND=4) DTGRID_NX  ! Y dimension of DeepThunder grid  == read once
    INTEGER(KIND=4) DTGRID_NY  ! X dimension of DeepThunder grid
    INTEGER INIT_DT  ! Flag to initialize deep thunder grid structures
    INTEGER NSTEP_CALLDT ! counter to flag DT file read call
    INTEGER NSTEPS   ! number of timesteps between DT file read
    INTEGER YREF,MREF,DREF   ! use this for output file namings
    LOGICAL DTFLAG
    LOGICAL NCWMS
    CHARACTER(LEN=1024) PATHDT,PATHNCWMS

    ! Declare a small number of global variables for VinconLeite Turbulence closure
    ! scheme parametrization
    REAL CP1
    REAL CP2
    REAL CP3
    REAL ALPHA_VLET
    REAL P2_MET
    REAL P2_HYPO

    ! VARIABLES RELATED TO DATA ASSIMILATION SCHEME
    INTEGER IDA_FLAG
    INTEGER,DIMENSION(2):: VP_I, VP_J
    INTEGER DAFREQ
    INTEGER NDAPOINTS
    INTEGER MUVSERMAX
    INTEGER NDATA_ASSIM
    INTEGER*8 ASSIMPOINTS
    INTEGER*8 ASSIMTOTAL
    INTEGER IBEG_DA, IEND_DA, JBEG_DA, JEND_DA  ! Describes spatial extents (READ FROM DA.INP FILE)
    INTEGER,ALLOCATABLE,DIMENSION(:):: LBLUE       !  COORDINATES OF THE DA ROUTINE
    INTEGER,ALLOCATABLE,DIMENSION(:):: IBLUE       !  LOCAL TO EACH SUBDOMAIN
    INTEGER,ALLOCATABLE,DIMENSION(:):: JBLUE       !
    REAL PMATRIX_R1
    REAL PMATRIX_R2
    REAL PMATRIX_A
    INTEGER EKPROJ
    !VARIABLES RELATED TO MAKAI DA SCHEME
    INTEGER ISWSEDA,NLWSEDA,ISUVDA,NLUVDA,NUVSER,KCUVDA,KCUVPOW !C21A
    INTEGER,ALLOCATABLE,DIMENSION(:)::MUVTLAST !C21A
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICWSEDA,JCWSEDA,NWSESERA !C21B
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICWSEDA_GL,JCWSEDA_GL,NWSESERA_GL !C21B
    REAL,ALLOCATABLE,DIMENSION(:)::TSWSEDA !C21B
    REAL,ALLOCATABLE,DIMENSION(:)::TSWSEDA_Gl !C21B
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICUVDA,JCUVDA,NUVSERA,IWUVDA,IRVUDA !C21C
    INTEGER,ALLOCATABLE,DIMENSION(:)::ICUVDA_GL,JCUVDA_GL,NUVSERA_GL,IWUVDA_GL,IRVUDA_GL !C21C
    REAL,ALLOCATABLE,DIMENSION(:)::TSUUDA,TSVVDA,NORMDIR,FSUVDA,RRUVDA,TSUVDA !C21C
    REAL,ALLOCATABLE,DIMENSION(:)::TSUUDA_GL,TSVVDA_GL,NORMDIR_GL,FSUVDA_GL,RRUVDA_GL,TSUVDA_GL !C21C
    INTEGER::ISACDA !Never initialized
    INTEGER::KCSERPOW !C66A
    REAL,ALLOCATABLE,DIMENSION(:)::IDIRCDA !In C66B
    REAL,ALLOCATABLE,DIMENSION(:)::TUVKC,TCSERKC !In AINIT.FOR
    INTEGER KCSERDA !In AINIT.FOR
    INTEGER,ALLOCATABLE,DIMENSION(:)::MUVSER !In INPUT.FOR
    REAL,ALLOCATABLE,DIMENSION(:)::TCUVSER,TAUVSER !In INPUT.FOR
    REAL,ALLOCATABLE,DIMENSION(:,:)::TUVSER !In INPUT.FOR
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::USER,VSER !In INPUT.FOR
    REAL,ALLOCATABLE,DIMENSION(:,:)::USERT,VSERT !In INPUT.FOR
    REAL,ALLOCATABLE,DIMENSION(:)::TSUTMP,TSVTMP !In puvdasm.for
    REAL,ALLOCATABLE,DIMENSION(:,:)::QWSEDA !In puvdasm.for
    INTEGER,ALLOCATABLE,DIMENSION(:)::IDC_GL,JDC_GL !In INPUT.FOR
    INTEGER,ALLOCATABLE,DIMENSION(:)::IDC,JDC !In INPUT.FOR
    REAL,ALLOCATABLE,DIMENSION(:)::CDAWT,CDAWTNS !In INPUT.FOR
    REAL,ALLOCATABLE,DIMENSION(:)::AREANEW,AREAOLD !In GVC
    INTEGER::NSPNG !Number of sponge layers
    REAL,ALLOCATABLE,DIMENSION(:)::R1,R2,RU1,RU2 !DA sponge layer variables
    REAL,ALLOCATABLE,DIMENSION(:,:)::QWSEASM
    REAL,ALLOCATABLE,DIMENSION(:)::WINDSXX
    REAL,ALLOCATABLE,DIMENSION(:)::WINDSXY
    REAL,ALLOCATABLE,DIMENSION(:)::WINDSYX
    REAL,ALLOCATABLE,DIMENSION(:)::WINDSYY
    REAL,ALLOCATABLE,DIMENSION(:)::UROTTMP,VROTTMP
    REAL,ALLOCATABLE,DIMENSION(:)::RFBODYFXI,RFBODYFYI
    ! Begin MACROALGAE variables
    INTEGER::MCOUNT !number of different types of macroalgae
    LOGICAL::LOGMAC
    REAL,ALLOCATABLE,DIMENSION(:,:)::RMAC !How much are macroalgae present in a layer
    REAL,ALLOCATABLE,DIMENSION(:)::ZMAXMAC  ! (LCM) maximum macroalgae height
    REAL,ALLOCATABLE,DIMENSION(:)::ZMINMAC  ! (LCM) starting macroalgae height
    REAL,ALLOCATABLE,DIMENSION(:)::MACDEN   ! (LCM) macroalgae density
    REAL,ALLOCATABLE,DIMENSION(:)::MACDIAM  ! (LCM) macroalgae diameter
    REAL,ALLOCATABLE,DIMENSION(:)::MACHP    ! (LCM) MACROALGAE height, HP
    REAL,ALLOCATABLE,DIMENSION(:)::MACAD    ! (LCM) Macroalgae flow-facing area times diameter
    REAL,ALLOCATABLE,DIMENSION(:)::MVEGZ  ! Porosity factor in Z
    REAL,ALLOCATABLE,DIMENSION(:,:,:)::MACLIM
    INTEGER,ALLOCATABLE,DIMENSION(:,:)::IJLMAC !(MCOUNT,3) # of cells with macroalgae:1=I-loc, 2=J-loc, 3=L-loc
    LOGICAL,ALLOCATABLE,DIMENSION(:,:)::KMAC !Macroalgae in layer
    ! End MACROALGAE variables
    ! Begin variables related to WQ write
    INTEGER,ALLOCATABLE,DIMENSION(:)::IC_STRID  ! Provides starting I coordinate related to global domain
    INTEGER,ALLOCATABLE,DIMENSION(:)::JC_STRID  ! Provides starting j coordinate related to global domain

    ! Logical to assign dilution rate
    LOGICAL KINSALE_DILUTION
    ! Logical to compute residence times
    LOGICAL COMP_RESIDENCE

END
